ResourceAlreadyExistsException extends Exception { public String getResourceId() { return resourceId; } ResourceAlreadyExistsException(String resourceId); String getResourceId();  }
@Test public void testGetResourceId() throws Exception { ResourceAlreadyExistsException exception = new ResourceAlreadyExistsException("id"); Assert.assertEquals("id", exception.getResourceId()); }