Skip to content

Commit 7bfafa3

Browse files
committed
DATAREDIS-839 - Get rid of unnecessary stubbings in MappingRedisEntityInformation.
Related tickets: DATACMNS-1333.
1 parent 2b2995a commit 7bfafa3

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/test/java/org/springframework/data/redis/repository/core/MappingRedisEntityInformationUnitTests.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,11 @@
1717

1818
import static org.mockito.Mockito.*;
1919

20-
import java.io.Serializable;
21-
2220
import org.junit.Test;
2321
import org.junit.runner.RunWith;
2422
import org.mockito.Mock;
2523
import org.mockito.junit.MockitoJUnitRunner;
2624
import org.springframework.data.mapping.MappingException;
27-
import org.springframework.data.redis.core.convert.ConversionTestEntities;
2825
import org.springframework.data.redis.core.mapping.RedisPersistentEntity;
2926

3027
/**
@@ -37,11 +34,10 @@ public class MappingRedisEntityInformationUnitTests<T, ID> {
3734
@Mock RedisPersistentEntity<T> entity;
3835

3936
@Test(expected = MappingException.class) // DATAREDIS-425
40-
@SuppressWarnings("unchecked")
4137
public void throwsMappingExceptionWhenNoIdPropertyPresent() {
4238

4339
when(entity.hasIdProperty()).thenReturn(false);
44-
when(entity.getType()).thenReturn((Class<T>) ConversionTestEntities.Person.class);
40+
4541
new MappingRedisEntityInformation<T, ID>(entity);
4642
}
4743
}

0 commit comments

Comments
 (0)