### Question:
PersonDeleteHandler implements ContextualRequestMessageHandler<Person> { @Override public MessageBody handleRequest(Person context, PlatformMessage msg) { deleter.removePersonFromPlace(UUID.fromString(msg.getPlaceId()), context, msg.getActor(), true); return PersonCapability.DeleteResponse.instance(); } @Inject  PersonDeleteHandler(PersonDeleter deleter); @Override String getMessageType(); @Override MessageBody handleRequest(Person context, PlatformMessage msg);  }### Answer:
@Test public void testCannotDeletePrimaryOwner() { EasyMock.expect(placeDao.findById(place.getId())).andReturn(place); EasyMock.expect(accountDaoMock.findById(person.getAccountId())).andReturn(account); replay(); try { handler.handleRequest(person, createDelete()); } catch(ErrorEventException ee) { assertEquals("account.owner.deletion", ee.getCode()); } }