public Optional<String> fetchFileIfNotModified(String url) throws IOException {
        return fetchFile(url, true);
    }
@Test
    public void doNotRetrieveIfNotModified() throws Exception {
        this.server.enqueue(new MockResponse()
                .setResponseCode(200)
                .setBody("foobar")
                .setHeader("Last-Modified", "Fri, 18 Aug 2017 15:02:41 GMT"));
        this.server.enqueue(new MockResponse()
                .setResponseCode(304)
                .setHeader("Last-Modified", "Fri, 18 Aug 2017 15:02:41 GMT"));
        server.start();

        final HTTPFileRetriever httpFileRetriever = new HTTPFileRetriever(new OkHttpClient());

        final Optional<String> body = httpFileRetriever.fetchFileIfNotModified(server.url("/").toString());
        final RecordedRequest request = server.takeRequest();

        assertThat(request).isNotNull();
        assertThat(request.getPath()).isEqualTo("/");

        assertThat(body).isNotNull()
                .isPresent()
                .contains("foobar");

        final Optional<String> secondBody = httpFileRetriever.fetchFileIfNotModified(server.url("/").toString());
        final RecordedRequest secondRequest = server.takeRequest();

        assertThat(secondRequest).isNotNull();
        assertThat(secondRequest.getPath()).isEqualTo("/");
        assertThat(secondRequest.getHeader("If-Modified-Since")).isEqualTo("Fri, 18 Aug 2017 15:02:41 GMT");

        assertThat(secondBody).isNotNull()
                .isEmpty();
    }