CacheEntry implements Serializable { public InputStream tryGetInputStream(HttpServletRequest request, MutableObject<byte[]> sourceMapResult) throws IOException { InputStream result = null; if (bytes != null || filename != null) { try { result = getInputStream(request, sourceMapResult); } catch (Exception e) { if (LayerImpl.log.isLoggable(Level.SEVERE)) { LayerImpl.log.log(Level.SEVERE, e.getMessage(), e); } } } return result; } CacheEntry(CacheEntry other);   CacheEntry(int layerId, String layerKey, long lastModified); InputStream getInputStream(HttpServletRequest request, MutableObject<byte[]> sourceMapResult); InputStream tryGetInputStream(HttpServletRequest request, MutableObject<byte[]> sourceMapResult); void setBytes(byte[] bytes); void setData(byte[] bytes, byte[] sourceMap); synchronized void delete(final ICacheManager mgr); boolean isDeleted(); String getFilename(); int getSize(); void persist(final ICacheManager mgr); @Override String toString();  }
@Test public void testTryGetInputStream() throws Exception { CacheEntry entry = new CacheEntry(0, "key", -1); InputStream in = entry.tryGetInputStream(mockRequest, null); Assert.assertNull(in); }