From 7bfafa3ed55bbe4d556c912e62015df149e42849 Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Fri, 1 Jun 2018 14:22:41 +0200 Subject: [PATCH] DATAREDIS-839 - Get rid of unnecessary stubbings in MappingRedisEntityInformation. Related tickets: DATACMNS-1333. --- .../core/MappingRedisEntityInformationUnitTests.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/test/java/org/springframework/data/redis/repository/core/MappingRedisEntityInformationUnitTests.java b/src/test/java/org/springframework/data/redis/repository/core/MappingRedisEntityInformationUnitTests.java index 2a9500efc..becbb9cde 100644 --- a/src/test/java/org/springframework/data/redis/repository/core/MappingRedisEntityInformationUnitTests.java +++ b/src/test/java/org/springframework/data/redis/repository/core/MappingRedisEntityInformationUnitTests.java @@ -17,14 +17,11 @@ package org.springframework.data.redis.repository.core; import static org.mockito.Mockito.*; -import java.io.Serializable; - import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.springframework.data.mapping.MappingException; -import org.springframework.data.redis.core.convert.ConversionTestEntities; import org.springframework.data.redis.core.mapping.RedisPersistentEntity; /** @@ -37,11 +34,10 @@ public class MappingRedisEntityInformationUnitTests { @Mock RedisPersistentEntity entity; @Test(expected = MappingException.class) // DATAREDIS-425 - @SuppressWarnings("unchecked") public void throwsMappingExceptionWhenNoIdPropertyPresent() { when(entity.hasIdProperty()).thenReturn(false); - when(entity.getType()).thenReturn((Class) ConversionTestEntities.Person.class); + new MappingRedisEntityInformation(entity); } }