@Test
  public void shouldWriteToOutputFileWhenNotUsingOutputDirAndIsSet() {
    when(mojo.getOutputFile()).thenReturn(OUTPUT_FILE);

    String output = builder.buildFrom(INPUT_FILE, mojo);
    assertThat(output, equalTo(fileUtils.createFullPath(BASE_DIR, OUTPUT_FILE)));
  }
  @Test
  public void shouldPrefixBasedirWhenNotUsingOutputBasedir() {
    when(mojo.getOutputDir()).thenReturn(OUTPUT_DIR);

    String output = builder.buildFrom(INPUT_FILE, mojo);
    assertThat(output, equalTo(fileUtils.createFullPath(BASE_DIR, OUTPUT_DIR, "input")));
  }
  @Test
  public void shouldPreservePathWhenPreserveIsEnabled() {
    when(mojo.isPreserveDir()).thenReturn(true);
    when(mojo.getOutputDir()).thenReturn(OUTPUT_DIR);

    String output = builder.buildFrom(INPUT_FILE, mojo);
    assertThat(output, equalTo(fileUtils.createFullPath(BASE_DIR, OUTPUT_DIR, INPUT_FILE)));
  }
 @Test
 public void shouldReturnInputFileWithBaseDirWhenNoOutputDirOrNoOutputFile() {
   String output = builder.buildFrom(INPUT_FILE, mojo);
   assertThat(output, equalTo(fileUtils.createFullPath(BASE_DIR, INPUT_FILE)));
 }