ProfileManager { public void remove(String userId) throws ServerException { requireNonNull(userId, "Required non-null user id"); profileDao.remove(userId); }  Profile getById(String userId); void create(Profile profile); void update(Profile profile); void remove(String userId);  }
@Test public void shouldRemoveProfile() throws Exception { profileManager.remove("user123"); verify(profileDao).remove("user123"); }
@Test(expectedExceptions = NullPointerException.class) public void shouldThrowNpeWhenRemovingNull() throws Exception { profileManager.remove(null); }