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
pull/8143/head
Brian Clozel 8 years ago
parent 7f39d5a865
commit 1709a3ad96

@ -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);
}

Loading…
Cancel
Save