Adapt to Assert.instanceOf changes
Since SPR-15196, the behavior of `Assert` methods changed and some were deprecated. This commit adapts to the new error mechanism implemented in `Assert.instanceOf`. Fixes gh-8140
This commit is contained in:
@@ -191,8 +191,7 @@ public class TestEntityManagerTests {
|
||||
public void getIdForTypeWhenTypeIsWrongShouldThrowException() throws Exception {
|
||||
TestEntity entity = new TestEntity();
|
||||
given(this.persistenceUnitUtil.getIdentifier(entity)).willReturn(123);
|
||||
this.thrown.expectMessage("ID mismatch Object of class [java.lang.Integer] "
|
||||
+ "must be an instance of class java.lang.Long");
|
||||
this.thrown.expectMessage("ID mismatch: java.lang.Integer");
|
||||
this.testEntityManager.getId(entity, Long.class);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user