@Test public void getDefaultCoOwners_oneCoOwnerName() { String coOwnerName = "test1"; Identity coOwnerIdentityMock = mock(Identity.class); when(campusConfigurationMock.getDefaultCoOwnerUserNames()).thenReturn(coOwnerName); when(baseSecurityMock.findIdentityByName(coOwnerName)).thenReturn(coOwnerIdentityMock); List<Identity> coOwners = campuskursCoOwnersTestObject.getDefaultCoOwners(); assertEquals("Wrong number of owners", 1, coOwners.size()); }
public List<Identity> getDefaultCoOwners() { if (identites != null) { return identites; } else { identites = initCoOwnerIdentities(); return identites; } }
CampuskursCoOwners { public List<Identity> getDefaultCoOwners() { if (identites != null) { return identites; } else { identites = initCoOwnerIdentities(); return identites; } } }
CampuskursCoOwners { public List<Identity> getDefaultCoOwners() { if (identites != null) { return identites; } else { identites = initCoOwnerIdentities(); return identites; } }  }
CampuskursCoOwners { public List<Identity> getDefaultCoOwners() { if (identites != null) { return identites; } else { identites = initCoOwnerIdentities(); return identites; } }  List<Identity> getDefaultCoOwners(); }
CampuskursCoOwners { public List<Identity> getDefaultCoOwners() { if (identites != null) { return identites; } else { identites = initCoOwnerIdentities(); return identites; } }  List<Identity> getDefaultCoOwners();  }