@Override
    public String arguments() {
        ArrayList<String> args = new ArrayList<>();
        if (buildFile != null) {
            args.add("-f \"" + FilenameUtils.separatorsToUnix(buildFile) + "\"");
        }

        if (target != null) {
            args.add(target);
        }

        return StringUtils.join(args, " ");
    }
@Test
    public void shouldGiveArgumentsIncludingBuildfileAndTarget() {
        AntTask task = new AntTask();
        task.setBuildFile("build/build.xml");
        task.setTarget("compile");
        assertThat(task.arguments(), is("-f \"build/build.xml\" compile"));
    }