@Test
public void testReorder_orderByLanguage() throws IOException {

  // - preparation
  final Path propertiesRootDirectory= this.tmpFolder.getRoot().toPath();
  final File f1= createI18nBundle(propertiesRootDirectory, ""
    + "keyC = valueC\n"
    + "keyB = valueB\n"
    + "keyA = valueA\n"
    + "keyE = valueE\n"
    + "keyD = valueD\n"
  );
  final File f2= createI18nBundle(propertiesRootDirectory, ""
    + "keyE = valueE\n"
    + "keyD = valueD\n"
    + "keyC = valueC\n"
    + "keyB = valueB\n"
    + "keyA = valueA\n"
  );
  final FileMatcher fileMatcher= new FileMatcher(propertiesRootDirectory, new String[]{"**/*.properties"}, new String[]{""});
  // - execution
  new KiltReformatter()
    .reorderByTemplate(f1, fileMatcher, AttachCommentsTo.NEXT_PROPERTY, UTF_8);
  // - verification
  assertThat(contentOf(f1)).isEqualTo(""
    + "keyC = valueC\n"
    + "keyB = valueB\n"
    + "keyA = valueA\n"
    + "keyE = valueE\n"
    + "keyD = valueD\n"
  );
  assertThat(contentOf(f2)).isEqualTo(""
    + "keyC = valueC\n"
    + "keyB = valueB\n"
    + "keyA = valueA\n"
    + "keyE = valueE\n"
    + "keyD = valueD\n"
  );
}