56
56
* @author Mark Paluch
57
57
* @author Jens Schauder
58
58
*/
59
- public class MappingJdbcConverterUnitTests {
59
+ class MappingJdbcConverterUnitTests {
60
60
61
- public static final UUID UUID = java .util .UUID .fromString ("87a48aa8-a071-705e-54a9-e52fe3a012f1" );
62
- public static final byte [] BYTES_REPRESENTING_UUID = { -121 , -92 , -118 , -88 , -96 , 113 , 112 , 94 , 84 , -87 , -27 , 47 , -29 ,
61
+ private static final UUID UUID = java .util .UUID .fromString ("87a48aa8-a071-705e-54a9-e52fe3a012f1" );
62
+ private static final byte [] BYTES_REPRESENTING_UUID = { -121 , -92 , -118 , -88 , -96 , 113 , 112 , 94 , 84 , -87 , -27 , 47 ,
63
+ -29 ,
63
64
-96 , 18 , -15 };
64
65
65
- JdbcMappingContext context = new JdbcMappingContext ();
66
- StubbedJdbcTypeFactory typeFactory = new StubbedJdbcTypeFactory ();
67
- MappingJdbcConverter converter = new MappingJdbcConverter ( //
66
+ private JdbcMappingContext context = new JdbcMappingContext ();
67
+ private StubbedJdbcTypeFactory typeFactory = new StubbedJdbcTypeFactory ();
68
+ private MappingJdbcConverter converter = new MappingJdbcConverter ( //
68
69
context , //
69
70
(identifier , path ) -> {
70
71
throw new UnsupportedOperationException ();
@@ -74,7 +75,7 @@ public class MappingJdbcConverterUnitTests {
74
75
);
75
76
76
77
@ Test // DATAJDBC-104, DATAJDBC-1384
77
- public void testTargetTypesForPropertyType () {
78
+ void testTargetTypesForPropertyType () {
78
79
79
80
RelationalPersistentEntity <?> entity = context .getRequiredPersistentEntity (DummyEntity .class );
80
81
@@ -95,7 +96,7 @@ public void testTargetTypesForPropertyType() {
95
96
}
96
97
97
98
@ Test // DATAJDBC-259
98
- public void classificationOfCollectionLikeProperties () {
99
+ void classificationOfCollectionLikeProperties () {
99
100
100
101
RelationalPersistentEntity <?> entity = context .getRequiredPersistentEntity (DummyEntity .class );
101
102
@@ -111,7 +112,7 @@ public void classificationOfCollectionLikeProperties() {
111
112
}
112
113
113
114
@ Test // DATAJDBC-221
114
- public void referencesAreNotEntitiesAndGetStoredAsTheirId () {
115
+ void referencesAreNotEntitiesAndGetStoredAsTheirId () {
115
116
116
117
RelationalPersistentEntity <?> entity = context .getRequiredPersistentEntity (DummyEntity .class );
117
118
@@ -176,7 +177,7 @@ void readByteArrayToNestedUuidWithCustomConverter() {
176
177
typeFactory //
177
178
);
178
179
179
- SoftAssertions . assertSoftly (softly -> {
180
+ assertSoftly (softly -> {
180
181
checkReadConversion (softly , converter , "uuidRef" , AggregateReference .to (UUID ));
181
182
checkReadConversion (softly , converter , "uuid" , UUID );
182
183
checkReadConversion (softly , converter , "optionalUuid" , Optional .of (UUID ));
@@ -337,7 +338,7 @@ private enum SomeEnum {
337
338
private static class OtherEntity {}
338
339
339
340
private static class StubbedJdbcTypeFactory implements JdbcTypeFactory {
340
- public Object [] arraySource ;
341
+ Object [] arraySource ;
341
342
342
343
@ Override
343
344
public Array createArray (Object [] value ) {
@@ -346,16 +347,16 @@ public Array createArray(Object[] value) {
346
347
}
347
348
}
348
349
349
- record WithOneToOne (@ Id String id , @ MappedCollection (idColumn = "renamed" ) Referenced referenced ) {
350
+ private record WithOneToOne (@ Id String id , @ MappedCollection (idColumn = "renamed" ) Referenced referenced ) {
350
351
}
351
352
352
- record Referenced (@ Id Long id ) {
353
+ private record Referenced (@ Id Long id ) {
353
354
}
354
355
355
- record ReferencedByUuid (@ Id UUID id ) {
356
+ private record ReferencedByUuid (@ Id UUID id ) {
356
357
}
357
358
358
- class ByteArrayToUuid implements Converter <byte [], UUID > {
359
+ static class ByteArrayToUuid implements Converter <byte [], UUID > {
359
360
@ Override
360
361
public UUID convert (byte [] source ) {
361
362
0 commit comments