Beispiel #1
0
  @Test
  public void testDeleteCacheByGridSetId() throws Exception {

    when(storageBroker.deleteByGridSetId(eq("layer"), eq("gset1")))
        .thenThrow(new StorageException("fake"));

    try {
      mediator.deleteCacheByGridSetId("layer", "gset1");
      fail();
    } catch (RuntimeException e) {
      assertTrue(true);
    }
    mediator.deleteCacheByGridSetId("layer", "gset2");
    verify(storageBroker, times(1)).deleteByGridSetId(eq("layer"), eq("gset2"));
  }