/*
* Create a mock storage broker that has never an image in its blob store and that captures
* the TileObject the seeder requests it to store for further test validation
*/
final StorageBroker mockStorageBroker = EasyMock.createMock(StorageBroker.class);
Capture<TileObject> storedObjects = new Capture<TileObject>() {
/**
* Override because setValue with anyTimes() resets the list of values
*/
@Override
public void setValue(TileObject o) {
super.getValues().add(o);
}
};
expect(mockStorageBroker.put(capture(storedObjects))).andReturn(true).anyTimes();
expect(mockStorageBroker.get((TileObject) anyObject())).andReturn(false).anyTimes();
replay(mockStorageBroker);
TileRange tr = TileBreeder.createTileRange(req, tl);
TileRangeIterator trIter = new TileRangeIterator(tr, tl.getMetaTilingFactors());