### Question:
DeleteOrganizationalUnitPopUpPresenter { public void onOrganizationalUnitRemoved(@Observes final RemoveOrganizationalUnitEvent removedOrganizationalUnitEvent) { if (removedOrganizationalUnitEvent.getOrganizationalUnit().getName().equals(organizationalUnit.getName())) { cancel(); } } @Inject  DeleteOrganizationalUnitPopUpPresenter(final View view,
                                                  final Caller<OrganizationalUnitService> organizationalUnitService,
                                                  final OrganizationalUnitController organizationalUnitController,
                                                  final Event<NotificationEvent> notificationEvent,
                                                  final LibraryPlaces libraryPlaces); @PostConstruct void setup(); void show(final OrganizationalUnit organizationalUnit); void delete(); void cancel(); void onOrganizationalUnitRemoved(@Observes final RemoveOrganizationalUnitEvent removedOrganizationalUnitEvent);  }### Answer:
@Test public void currentOrganizationalUnitRemovedTest() { final OrganizationalUnit organizationalUnit = mock(OrganizationalUnit.class); doReturn("ou-name").when(organizationalUnit).getName(); presenter.organizationalUnit = organizationalUnit; presenter.onOrganizationalUnitRemoved(new RemoveOrganizationalUnitEvent(organizationalUnit, "admin")); verify(view).hide(); }
@Test public void anotherOrganizationalUnitRemovedTest() { final OrganizationalUnit organizationalUnit = mock(OrganizationalUnit.class); doReturn("ou-name").when(organizationalUnit).getName(); presenter.organizationalUnit = mock(OrganizationalUnit.class); doReturn("another-ou-name").when(organizationalUnit).getName(); presenter.onOrganizationalUnitRemoved(new RemoveOrganizationalUnitEvent(organizationalUnit, "admin")); verify(view, never()).hide(); }