final DefaultHttpCacheEntrySerializer ser = new DefaultHttpCacheEntrySerializer();
final ByteArrayOutputStream bos1 = new ByteArrayOutputStream();
ser.writeTo(entry, bos1);
final byte[] bytes1 = bos1.toByteArray();
final ByteArrayOutputStream bos2 = new ByteArrayOutputStream();
ser.writeTo(resultEntry, bos2);
final byte[] bytes2 = bos2.toByteArray();
assertEquals(bytes1.length, bytes2.length);
for(int i = 0; i < bytes1.length; i++) {
assertEquals(bytes1[i], bytes2[i]);
}