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

    mediator.destroy();

    ArgumentCaptor<CatalogListener> captor = ArgumentCaptor.forClass(CatalogListener.class);
    verify(catalog, times(2)).removeListener(captor.capture());
    for (CatalogListener captured : captor.getAllValues()) {
      assertTrue(
          captured instanceof CatalogLayerEventListener
              || captured instanceof CatalogStyleChangeListener);
    }
  }