From 1709a3ad96aa16ba50ab23ffa67571d8adc485a8 Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Tue, 31 Jan 2017 11:42:20 +0100 Subject: [PATCH] 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 --- .../test/autoconfigure/orm/jpa/TestEntityManagerTests.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/orm/jpa/TestEntityManagerTests.java b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/orm/jpa/TestEntityManagerTests.java index 727fbe8cbd..d34168266f 100644 --- a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/orm/jpa/TestEntityManagerTests.java +++ b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/orm/jpa/TestEntityManagerTests.java @@ -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); }