UnsupportedPropertyException extends Exception { public Set<String> getPropertyIds() { return propertyIds; } UnsupportedPropertyException(String type, Set<String> propertyIds); String getType(); Set<String> getPropertyIds();  }
@Test public void testGetPropertyIds() throws Exception { Set<String> ids = new HashSet<String>(); ids.add("p1"); ids.add("p2"); UnsupportedPropertyException exception = new UnsupportedPropertyException("type", ids); Assert.assertEquals(ids, exception.getPropertyIds()); }