UnsupportedPropertyException extends Exception { public String getType() { return type; } UnsupportedPropertyException(String type, Set<String> propertyIds); String getType(); Set<String> getPropertyIds();  }
@Test public void testGetType() throws Exception { UnsupportedPropertyException exception = new UnsupportedPropertyException("type", Collections.singleton("p1")); Assert.assertEquals("type", exception.getType()); }