StoreImage implements ICachable<StoreImage> { public ImageSize getSize() { return size; } StoreImage(final long id, BufferedImage image, ImageSize size);  StoreImage(final long id, byte[] base64, ImageSize size);  StoreImage(StoreImage image); long getId(); BufferedImage getImage(); ImageSize getSize(); @Override long getByteSize(); String getBase64(); byte[] getByteArray(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); static final String STORE_IMAGE_FORMAT; static final String STORE_IMAGE_DATA_STRING; }
@Test public void testConstructor() { new StoreImage(IMG_ID0, img, ImageSizePreset.ICON.getSize()); new StoreImage(IMG_ID0, IMG_DATA.getBytes(), ImageSizePreset.ICON.getSize()); new StoreImage(mockedImg0); }
@Test(expected = NullPointerException.class) public void testByteArrayConstructorNull() { new StoreImage(IMG_ID0, (byte[]) null, ImageSizePreset.ICON.getSize()); }
@Test(expected = NullPointerException.class) public void testImageConstructorNull() { new StoreImage(IMG_ID0, (BufferedImage) null, ImageSizePreset.ICON.getSize()); }
@Test public void testGetSize() { StoreImage uut = new StoreImage(IMG_ID1, IMG_DATA.getBytes(), ImageSizePreset.ICON.getSize()); assertEquals(ImageSizePreset.ICON.getSize(), uut.getSize()); }