### Question:
CacheEntry { public final String getData() { if (data == null) { return ""; } else { return data; } } CacheEntry(); final String getData(); final void setData(final String data); final int getHits(); final void incrementHits(); final int getMisses(); final void incrementMisses(); final boolean isExpired(final Date date); final void setExpiresIn(final int expiresInSeconds); final float getHitRate(); final float getMissRate();  }### Answer:
@Test public void testGetData() throws Exception { CacheEntry cacheEntry = new CacheEntry(); final String expResult = "hello world"; cacheEntry.setData(expResult); final String result = cacheEntry.getData(); assertEquals(expResult, result); }