private void assertException(Throwable t, Class<? extends Exception> exType, String exMessageToContain) {
assertEquals("Expected exception of type " + exType + " but was " + t, exType, t.getClass());
if(exMessageToContain!=null) {
private void assertException(Throwable t, Class<? extends Exception> exType, String exMessageToContain) {
assertEquals("Expected exception of type " + exType + " but was " + t, exType, t.getClass());
if(exMessageToContain!=null) {