### Question:
CacheEntry { final int getBytes() { return getData().getBytes(Charset.forName("UTF-8")).length; } 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 testGetBytes() throws Exception { CacheEntry cacheEntry = new CacheEntry(); final int expResult = 11; cacheEntry.setData("hello world"); final int result = cacheEntry.getBytes(); assertEquals(expResult, result); }