replaced usage of Assert.fail by throwing AssertionError by hand