StaticDirectoryController implements StaticContentController { @Override public void cache(Duration maxAge) { cacheHeader = "public, max-age=" + maxAge.getSeconds(); } StaticDirectoryController(Path contentDirectory); @Override Response execute(Request request); @Override void cache(Duration maxAge);  }
@Test void cache() { controller.cache(Duration.ofMinutes(10)); assertEquals("public, max-age=600", controller.cacheHeader); }