@Test
public void shouldReadConfigFile() throws IOException {

    List<String> lines = Arrays.asList("credentials.username=someuser2", "credentials.password=secret");
    assertThat(directory.mkdirs()).isTrue();
    File file = new File(directory, "testApp.properties");
    Files.write(file.toPath(), lines);
    ConfigMap configuration = ConfigMap.read(file);
    assertThat(configuration).containsEntry("credentials.username", "someuser2");
}