@Test public void onDestroy_shouldHideLocationMarker() throws Exception { fragment.onDestroy(); assertThat( fragment .getMapFragment() .getMap() .layers() .contains(fragment.getMapFragment().getLocationMarkerLayer())) .isTrue(); }
@Test(expected = IllegalArgumentException.class) public void onDestroy_shouldUnregisterWithEventBus() throws Exception { fragment.onDestroy(); bus.unregister(fragment); }