@Before @Override public void setUp() throws Exception { super.setUp(); action.setServletRequest(getMockRequest()); subInvestigator = profile.addSubInvestigator(person); subInvestigator.setId(ValueGenerator.getUniqueLong()); action.setProfile(profile); action.setPersonAssociationId(subInvestigator.getId()); action.setPersonAssociation(subInvestigator); when(mockPersonAssociationService.getSubInvestigatorById(subInvestigator.getId())) .thenReturn(subInvestigator); }