FileCacheDataLoader implements DataLoader, DSSFileLoader { @Override public byte[] get(final String url, final boolean refresh) throws DSSException { DSSDocument document = getDocument(url, refresh); return DSSUtils.toByteArray(document); } FileCacheDataLoader();  FileCacheDataLoader(DataLoader dataLoader); DataLoader getDataLoader(); void setDataLoader(DataLoader dataLoader); void setFileCacheDirectory(final File fileCacheDirectory); void setCacheExpirationTime(long cacheExpirationTimeInMilliseconds); void setResourceLoader(final ResourceLoader resourceLoader); void addToBeLoaded(final String url); void addToBeIgnored(final String urlString); @Override byte[] get(final String url, final boolean refresh); @Override byte[] get(final String url); @Override DSSDocument getDocument(String url); @Override boolean remove(String url); File createFile(final String urlString, final byte[] bytes); byte[] loadFileFromCache(final String urlString); @Override byte[] post(final String urlString, final byte[] content); @Override DataAndUrl get(final List<String> urlStrings); @Override void setContentType(String contentType);  }
@Test public void testNotDefineSubDataLoader() { FileCacheDataLoader fcdl = new FileCacheDataLoader(); assertThrows(NullPointerException.class, () -> fcdl.get(URL_TO_LOAD)); }