@Test(expected = IllegalArgumentException.class) public void testGetBackgroundItemsNotSet() { sut.getBackgroundItems(BackgroundItemType.NOT_SET); }
public List<BackgroundItem> getBackgroundItems(final BackgroundItemType inBackgroundType) { List<BackgroundItem> outBackgroundItems; switch (inBackgroundType) { case SKILL: outBackgroundItems = skills; break; case INTEREST: outBackgroundItems = interests; break; case AFFILIATION: outBackgroundItems = affiliations; break; case HONOR: outBackgroundItems = honors; break; default: String msg = inBackgroundType + " is not handled"; throw new IllegalArgumentException(msg); } return outBackgroundItems; }
Background extends DomainEntity implements Serializable { public List<BackgroundItem> getBackgroundItems(final BackgroundItemType inBackgroundType) { List<BackgroundItem> outBackgroundItems; switch (inBackgroundType) { case SKILL: outBackgroundItems = skills; break; case INTEREST: outBackgroundItems = interests; break; case AFFILIATION: outBackgroundItems = affiliations; break; case HONOR: outBackgroundItems = honors; break; default: String msg = inBackgroundType + " is not handled"; throw new IllegalArgumentException(msg); } return outBackgroundItems; } }
Background extends DomainEntity implements Serializable { public List<BackgroundItem> getBackgroundItems(final BackgroundItemType inBackgroundType) { List<BackgroundItem> outBackgroundItems; switch (inBackgroundType) { case SKILL: outBackgroundItems = skills; break; case INTEREST: outBackgroundItems = interests; break; case AFFILIATION: outBackgroundItems = affiliations; break; case HONOR: outBackgroundItems = honors; break; default: String msg = inBackgroundType + " is not handled"; throw new IllegalArgumentException(msg); } return outBackgroundItems; } @SuppressWarnings("unused") private  Background();  Background(final Person inPerson); }
Background extends DomainEntity implements Serializable { public List<BackgroundItem> getBackgroundItems(final BackgroundItemType inBackgroundType) { List<BackgroundItem> outBackgroundItems; switch (inBackgroundType) { case SKILL: outBackgroundItems = skills; break; case INTEREST: outBackgroundItems = interests; break; case AFFILIATION: outBackgroundItems = affiliations; break; case HONOR: outBackgroundItems = honors; break; default: String msg = inBackgroundType + " is not handled"; throw new IllegalArgumentException(msg); } return outBackgroundItems; } @SuppressWarnings("unused") private  Background();  Background(final Person inPerson); List<BackgroundItem> getBackgroundItems(final BackgroundItemType inBackgroundType); void setBackgroundItems(final List<BackgroundItem> inBackgroundItems,
            final BackgroundItemType inBackgroundType); }
Background extends DomainEntity implements Serializable { public List<BackgroundItem> getBackgroundItems(final BackgroundItemType inBackgroundType) { List<BackgroundItem> outBackgroundItems; switch (inBackgroundType) { case SKILL: outBackgroundItems = skills; break; case INTEREST: outBackgroundItems = interests; break; case AFFILIATION: outBackgroundItems = affiliations; break; case HONOR: outBackgroundItems = honors; break; default: String msg = inBackgroundType + " is not handled"; throw new IllegalArgumentException(msg); } return outBackgroundItems; } @SuppressWarnings("unused") private  Background();  Background(final Person inPerson); List<BackgroundItem> getBackgroundItems(final BackgroundItemType inBackgroundType); void setBackgroundItems(final List<BackgroundItem> inBackgroundItems,
            final BackgroundItemType inBackgroundType);  }