CacheHeader { public static void setNonCachingHeaders(@NotNull HttpServletResponse response) { response.setHeader(HEADER_PRAGMA, "no-cache"); response.setHeader(HEADER_CACHE_CONTROL, "no-cache"); response.setHeader(HEADER_EXPIRES, "0"); response.setHeader(HEADER_DISPATCHER, "no-cache"); } private  CacheHeader(); static boolean isNotModified(@NotNull Resource resource,
      @NotNull SlingHttpServletRequest request, @NotNull SlingHttpServletResponse response); static boolean isNotModified(@NotNull Resource resource,
      @NotNull SlingHttpServletRequest request, @NotNull SlingHttpServletResponse response, boolean setExpiresHeader); static boolean isNotModified(@NotNull ModificationDateProvider dateProvider,
      @NotNull SlingHttpServletRequest request, @NotNull SlingHttpServletResponse response); static boolean isNotModified(@NotNull ModificationDateProvider dateProvider,
      @NotNull SlingHttpServletRequest request, @NotNull SlingHttpServletResponse response, boolean setExpiresHeader); static void setNonCachingHeaders(@NotNull HttpServletResponse response); static void setExpires(@NotNull HttpServletResponse response, @Nullable Date date); static void setExpiresSeconds(@NotNull HttpServletResponse response, int seconds); static void setExpiresHours(@NotNull HttpServletResponse response, int hours); static void setExpiresDays(@NotNull HttpServletResponse response, int days);  }
@Test void testSetNonCachingHeaders() throws Exception { CacheHeader.setNonCachingHeaders(response); verify(response).setHeader(HEADER_PRAGMA, "no-cache"); verify(response).setHeader(HEADER_CACHE_CONTROL, "no-cache"); verify(response).setHeader(HEADER_EXPIRES, "0"); verify(response).setHeader(HEADER_DISPATCHER, "no-cache"); verifyNoMoreInteractions(response); }