@Test
public void listsSubDirectory() throws Exception {
handler.enableDirectoryListing(true).welcomeFile("doesnotexist");
StubHttpResponse response = handle(request("/"));
assertEquals(200, response.status());
// / is a /
assertThat(response.contentsString(), containsString("href=\"subdir/\""));
assertThat(response.contentsString(), not(containsString("subfile.txt")));
response = handle(request("/subdir/"));
assertEquals(200, response.status());
assertThat(response.contentsString(), containsString("subfile.txt"));
assertThat(response.contentsString(), not(containsString("index.html")));
}