public class BlobStoreTest extends TestCase {
public static final String TEST_BLOB_DIR_NAME = "gwcTestBlobs";
public void testTile() throws Exception {
FileBlobStore fbs = setup();
Resource bytes = new ByteArrayResource("1 2 3 4 5 6 test".getBytes());
long[] xyz = { 1L, 2L, 3L };
Map<String, String> parameters = new HashMap<String, String>();
parameters.put("a", "x");
parameters.put("b", "ø");
TileObject to = TileObject.createCompleteTileObject("test:123123 112", xyz, "EPSG:4326",
"image/jpeg", parameters, bytes);
to.setId(11231231);
fbs.put(to);
TileObject to2 = TileObject.createQueryTileObject("test:123123 112", xyz, "EPSG:4326",
"image/jpeg", parameters);
to2.setId(11231231);
Resource resp = fbs.get(to2);
to2.setBlob(resp);
assertEquals(to.getBlobFormat(), to2.getBlobFormat());
InputStream is = to.getBlob().getInputStream();