public void testStoreAndGetImage() throws IOException { BufferedImage image = ImageIO.read(new File(TEST_IMAGE)); String fname = ";type=UV/original.jpg"; context.store(fname, image); assertTrue(context.exists(fname)); assertFalse(store.exists(fname)); assertTrue(store.exists(CTX + fname)); BufferedImage im2 = context.get(fname); assertNotNull(im2); im2 = store.get(CTX + fname); assertNotNull(im2); }
public void testMultiLevelWrapping() throws IOException { BufferedImage image = ImageIO.read(new File(TEST_IMAGE)); String local = ";type=UV/"; ImageContext ctx = new ImageContext(context, local); String fname = "original.jpg"; ctx.store(fname, image); assertTrue(ctx.exists(fname)); assertFalse(store.exists(fname)); assertTrue(store.exists(CTX + local + fname)); BufferedImage im2 = ctx.get(fname); assertNotNull(im2); im2 = store.get(CTX + local + fname); assertNotNull(im2); }