### Question:
Profiles { public Profile[] getProfiles() { return nameMap.values().toArray(new Profile[] {}); } Profiles(Map<Integer, Profile> idMap, Map<String, Profile> nameMap); Profile getById(Integer id); Profile getByName(String name); Profile[] getProfiles(); @Override String toString(); void addOrChangeProfile(Profile profile, ACS acs); int deleteProfile(Profile profile, ACS acs, boolean cascade);  }### Answer:
@Test public void createProfile() throws SQLException { Unittype unittype = TestUtils.createUnittype("Test unittype", acs); Profile profile = TestUtils.createProfile("Test profile", unittype, acs); assertEquals(2, profile.getId().intValue()); assertEquals("Test profile", profile.getName()); assertEquals(2, profile.getUnittype().getProfiles().getProfiles().length); assertEquals("Default", profile.getUnittype().getProfiles().getProfiles()[0].getName()); assertEquals("Test profile", profile.getUnittype().getProfiles().getProfiles()[1].getName()); }