@Test
public void shouldCreateFromPath() throws IOException {
writeFiles(DEFAULT_CONFIG_DATA + "DefaultMimeType mime/text\n");
ServerConfig serverConfig = ServerConfigImpl.createFromPath(workingDirectory, tempDirectory);
assertThat(serverConfig.getTempPath(), is(tempDirectory));
assertThat(serverConfig.getBasePath(), is(workingDirectory));
assertThat(serverConfig.getDocumentRootPath(), is(workingDirectory + "wwwx"));
assertThat(serverConfig.getDirectoryIndex(), hasItem("index.php"));
assertThat(serverConfig.getDirectoryIndex(), hasItem("index.html"));
assertThat(serverConfig.getDirectoryIndex().size(), is(2));
assertThat(serverConfig.getErrorDocument403Path(), is(workingDirectory + "error403.html"));
assertThat(serverConfig.getErrorDocument404Path(), is(workingDirectory + "error404.html"));
assertThat(serverConfig.getListenPort(), is(8090));
assertThat(serverConfig.getMaxServerThreads(), is(3));
assertThat(serverConfig.isKeepAlive(), is(true));
assertThat(serverConfig.getMimeTypeMapping().getMimeTypeByExtension("ANY"), is("mime/text"));
assertThat(serverConfig.getAttribute(ADDITIONAL_ATTRIBUTE_NAME), is(ORIGINAL_VALUE));
}