public void testTooBig() throws Exception {
   ImageData imageData = getImageData(Fixture.IMAGE_100x50); // 1281 bytes
   Image image = ResourceFactory.findImage(imageData);
   assertNull(cache.getImageData(image));
   cache.putImageData(image, imageData);
   assertNull(cache.getImageData(image));
 }
 public void testSmallImage() throws Exception {
   ImageData imageData = getImageData(Fixture.IMAGE1); // 129 bytes
   Image image = ResourceFactory.findImage(imageData);
   assertNull(cache.getImageData(image));
   cache.putImageData(image, imageData);
   assertEqualsImageData(imageData, cache.getImageData(image));
 }
 public void testModifyData() throws Exception {
   ImageData originalData = getImageData(Fixture.IMAGE1);
   Image image = ResourceFactory.findImage(originalData);
   cache.putImageData(image, originalData);
   ImageData copyData1 = cache.getImageData(image);
   assertNotSame(originalData, copyData1);
   assertEqualsImageData(originalData, copyData1);
   // modify original data
   originalData.setPixel(0, 0, 23);
   ImageData copyData2 = cache.getImageData(image);
   assertNotSame(copyData1, copyData2);
   assertEqualsImageData(copyData1, copyData2);
 }