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:
Brian Clozel
2017-01-31 11:42:20 +01:00
parent 7f39d5a865
commit 1709a3ad96

View File

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