StatusDTO extends CandlepinDTO<StatusDTO> { public boolean addManagerCapability(String capability) { if (capability == null) { throw new IllegalArgumentException("capability is null"); } if (this.capabilities == null) { this.capabilities = new HashSet<>(); } return this.capabilities.add(capability); } StatusDTO();  StatusDTO(StatusDTO source); StatusDTO setResult(boolean result); boolean getResult(); String getVersion(); StatusDTO setVersion(String version); String getRelease(); StatusDTO setRelease(String release); boolean getStandalone(); StatusDTO setStandalone(boolean standalone); Date getTimeUTC(); StatusDTO setTimeUTC(Date timeUTC); String getRulesVersion(); StatusDTO setRulesVersion(String rulesVersion); String getRulesSource(); StatusDTO setRulesSource(String rulesSource); Set<String> getManagerCapabilities(); StatusDTO setManagerCapabilities(Collection<String> capabilities); boolean addManagerCapability(String capability); boolean removeManagerCapability(String capability); String getMode(); StatusDTO setMode(String mode); String getModeReason(); StatusDTO setModeReason(String reason); Date getModeChangeTime(); StatusDTO setModeChangeTime(Date time); @Override boolean equals(Object obj); @Override int hashCode(); @Override StatusDTO clone(); @Override StatusDTO populate(StatusDTO source);  }
@Test(expected = IllegalArgumentException.class) public void testAddNullToCapabilities() throws Exception { StatusDTO dto = new StatusDTO(); dto.addManagerCapability(null); }