Skip to content

Commit 77d9206

Browse files
authored
Removing unneed comments
1 parent 6810f42 commit 77d9206

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

src/test/java/org/socialsignin/spring/data/dynamodb/repository/query/PartTreeDynamoDBQueryUnitTest.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -139,26 +139,6 @@ private <T, ID extends Serializable> void setupCommonMocksForThisRepositoryMetho
139139
Mockito.when(mockEntityMetadata.isRangeKeyAware()).thenReturn(true);
140140
}
141141

142-
// Dirty Harry 9 3/4: In recent versions of spring-data-commons, a lot of
143-
// methods within
144-
// org.springframework.data.repository.query.QueryMethod have become final. Thus
145-
// they can't
146-
// be mocked by Mockito anymore
147-
// https://github.com/mockito/mockito/wiki/FAQ#what-are-the-limitations-of-mockito
148-
// Therefore setting the field explicitly that is used by all the isXXX methods
149-
// Removed due to Mockito upgrade - jdorman
150-
/*
151-
* try { Field unwrappedReturnTypeField = mockDynamoDBQueryMethod.getClass() //
152-
* Mockito-generated class .getSuperclass() //
153-
* org.socialsignin.spring.data.dynamodb.repository.query.DynamoDBQueryMethod
154-
* .getSuperclass() // org.springframework.data.repository.query.QueryMethod
155-
* .getDeclaredField("unwrappedReturnType");
156-
* unwrappedReturnTypeField.setAccessible(true); // It's final therefore
157-
* unlocking the field unwrappedReturnTypeField.set(mockDynamoDBQueryMethod,
158-
* clazz); } catch (Exception e) { // There is little we can and want do if it
159-
* fails - Aborting the whole test is // fine throw new RuntimeException(e); }
160-
*/
161-
162142
Mockito.when(mockDynamoDBQueryMethod.getEntityType()).thenReturn(clazz);
163143
Mockito.when(mockDynamoDBQueryMethod.getName()).thenReturn(repositoryMethodName);
164144
Mockito.when(mockDynamoDBQueryMethod.getParameters()).thenReturn(mockParameters);

0 commit comments

Comments
 (0)