### Question:
HopServerStatusCache implements Cache { public byte[] get( String logId, int from ) { CachedItem item = null; try { item = cachedMap.get( logId ); if ( item == null || item.getFrom() != from ) { return null; } synchronized ( item.getFile() ) { return Files.readAllBytes( item.getFile().toPath() ); } } catch ( Exception e ) { cachedMap.remove( logId ); if ( item != null ) { removeTask( item.getFile() ); } } return null; } private  HopServerStatusCache(); static synchronized HopServerStatusCache getInstance(); void put( String logId, String cacheString, int from ); byte[] get( String logId, int from ); void remove( String id ); @Override Object read( Object key ); @Override Object get( Object key ); @Override void put( Object key, Object value ); @Override void update( Object key, Object value ); @Override void remove( Object key ); @Override void clear(); @Override void destroy(); @Override Map toMap(); @Override void lock( Object key ); @Override void unlock( Object key ); @Override long nextTimestamp(); @Override int getTimeout(); @Override String getRegionName(); @Override long getSizeInMemory(); @Override long getElementCountInMemory(); @Override long getElementCountOnDisk(); static final String HOP_SERVER_STATUS_CACHE; }### Answer:
@Test public void testGet() throws Exception { initializeTestData( cache.getMap() ); Assert.assertNull( cacheSpy.get( "logId40", 0 ) ); File mockFile = cache.getMap().get( "logId1" ).getFile(); Path path = mock( Path.class ); when( mockFile.toPath() ).thenReturn( path ); cacheSpy.get( "logId1", 0 ); verify( mockFile ).toPath(); }