    @Test
    public void testRemoveListener() throws Exception {

        bsAgg = EasyMock.createMock("bsAgg", BlobStoreAggregator.class);
        tld = EasyMock.createMock("tld", TileLayerDispatcher.class);
        
        testBlobStoreInfo = EasyMock.createMock("testBlobStoreInfo", BlobStoreInfo.class);
        testBlobStore1 = EasyMock.createMock("testBlobStore1", BlobStore.class);
        
        testLayer = EasyMock.createMock("testLayer", TileLayer.class);
        EasyMock.expect(tld.getTileLayer("testLayer")).andStubReturn(testLayer);
        EasyMock.expect(testLayer.getBlobStoreId()).andStubReturn("testBlobStore");
        EasyMock.expect(bsAgg.getBlobStore("testBlobStore")).andStubReturn(testBlobStoreInfo);
        EasyMock.expect(testBlobStoreInfo.createInstance(EasyMock.eq(tld), 
                EasyMock.anyObject(LockProvider.class))).andReturn(testBlobStore1).once();
        EasyMock.expect(testBlobStoreInfo.isEnabled()).andStubReturn(true);
        EasyMock.expect(testBlobStore1.delete("testLayer")).andReturn(true).once();
        
        BlobStoreListener  testListener = 
            EasyMock.createMock("testListener", BlobStoreListener.class);
        
        
        //testBlobStore1.addListener(testListener);EasyMock.expectLastCall().once();
        
        EasyMock.replay(bsAgg, tld, testLayer, testBlobStoreInfo, testBlobStore1, testListener);
        
        ClusteredCompositeBlobStore ccbs = new ClusteredCompositeBlobStore(tld, bsAgg);
        ccbs.addListener(testListener);
        ccbs.removeListener(testListener);
        ccbs.delete("testLayer"); // Do something affecting testBlobStore
        
        EasyMock.verify(testBlobStore1);
    }