8
8
9
9
import com .fasterxml .jackson .databind .*;
10
10
import com .fasterxml .jackson .databind .annotation .JsonDeserialize ;
11
+ import com .fasterxml .jackson .databind .testutil .DatabindTestUtil ;
11
12
import com .fasterxml .jackson .databind .type .TypeFactory ;
12
13
13
14
import static org .junit .jupiter .api .Assertions .assertEquals ;
14
15
import static org .junit .jupiter .api .Assertions .assertNotNull ;
15
16
16
17
@ SuppressWarnings ("serial" )
17
- public class MapWithGenericValuesDeserTest
18
+ public class MapWithGenericValuesDeserTest extends DatabindTestUtil
18
19
{
19
20
/*
20
21
/**********************************************************
@@ -154,7 +155,7 @@ public void testKeyViaCtor() throws Exception
154
155
{
155
156
ObjectMapper mapper = new ObjectMapper ();
156
157
Map <KeyTypeCtor ,Integer > map = mapper .readValue ("{\" a\" :123}" ,
157
- TypeFactory . defaultInstance ().constructMapType (HashMap .class , KeyTypeCtor .class , Integer .class ));
158
+ defaultTypeFactory ().constructMapType (HashMap .class , KeyTypeCtor .class , Integer .class ));
158
159
assertEquals (1 , map .size ());
159
160
Map .Entry <?,?> entry = map .entrySet ().iterator ().next ();
160
161
assertEquals (Integer .valueOf (123 ), entry .getValue ());
@@ -168,7 +169,7 @@ public void testKeyViaFactory() throws Exception
168
169
{
169
170
ObjectMapper mapper = new ObjectMapper ();
170
171
Map <KeyTypeCtor ,Integer > map = mapper .readValue ("{\" a\" :123}" ,
171
- TypeFactory . defaultInstance ().constructMapType (HashMap .class , KeyTypeFactory .class , Integer .class ));
172
+ defaultTypeFactory ().constructMapType (HashMap .class , KeyTypeFactory .class , Integer .class ));
172
173
assertEquals (1 , map .size ());
173
174
Map .Entry <?,?> entry = map .entrySet ().iterator ().next ();
174
175
assertEquals (Integer .valueOf (123 ), entry .getValue ());
0 commit comments