@Test
public void canFindFileUsingAcceptHeader() {

    Optional<FileLocator.FileResult> result = fileLocator.find("p1/hello", singletonList("application/json"));
    assertTrue(result.isPresent());
    assertEquals(rootDir.resolve("p1/hello.json").toFile(), result.get().file);
    assertEquals(singletonList("application/json"), result.get().fileHttpHeaders.get("Content-Type"));
    assertTimestampIsWithinSecondsAgo(result.get().fileHttpHeaders.getFirst("Last-Modified").orElse("none"));
    result = fileLocator.find("p1/hello", singletonList("text/xml"));
    assertTrue(result.isPresent());
    assertEquals(rootDir.resolve("p1/hello.xml").toFile(), result.get().file);
    assertEquals(singletonList("text/xml"), result.get().fileHttpHeaders.get("Content-Type"));
    assertTimestampIsWithinSecondsAgo(result.get().fileHttpHeaders.getFirst("Last-Modified").orElse("none"));
}