ImageDB { public void setImageMapping(ImageDBKey imageKey, long imageID, ImageSize imageSize) { if (imageKey == null) { log.error("The supplied image key is null."); throw new NullPointerException("The supplied image key is null."); } if (imageKey.isProductKey()) { setImageMapping(imageKey.getProductID(), imageID, imageSize); } else { setImageMapping(imageKey.getWebUIName(), imageID, imageSize); } } ImageDB();  ImageDB(ImageDB copy); boolean hasImageID(ImageDBKey imageKey, ImageSize imageSize); boolean hasImageID(long productID, ImageSize imageSize); boolean hasImageID(String name, ImageSize imageSize); long getImageID(ImageDBKey imageKey, ImageSize imageSize); long getImageID(long productID, ImageSize imageSize); long getImageID(String name, ImageSize imageSize); ImageSize getImageSize(long imageID); void setImageMapping(ImageDBKey imageKey, long imageID, ImageSize imageSize); void setImageMapping(long productID, long imageID, ImageSize imageSize); void setImageMapping(String name, long imageID, ImageSize imageSize); void removeImageMapping(long imageID);  }
@Test(expected = NullPointerException.class) public void testSetImageMappingKeyNull() { uut.setImageMapping((ImageDBKey) null, NAME_IMAGE_ID, size); }
@Test(expected = NullPointerException.class) public void testSetImageMappingNameNull() { uut.setImageMapping((String) null, NAME_IMAGE_ID, size); }
@Test(expected = NullPointerException.class) public void testSetImageMappingProductSizeNull() { uut.setImageMapping(PRODUCT_ID, PRODUCT_IMAGE_ID, null); }
@Test(expected = NullPointerException.class) public void testSetImageMappingNameSizeNull() { uut.setImageMapping(NAME, NAME_IMAGE_ID, null); }
@Test(expected = NullPointerException.class) public void testSetImageMappingKeySizeNull() { uut.setImageMapping(mockedNameKey, NAME_IMAGE_ID, null); }