File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed
guava/src/test/java/com/fasterxml/jackson/datatype/guava/failing Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -13,16 +13,26 @@ static class Outside104 {
13
13
public Object aProperty ;
14
14
}
15
15
16
+ private final ObjectMapper MAPPER = mapperWithModule ();
17
+
16
18
// [datatypes-collections#104]
17
- public void testPolymorphicArrayMap () throws Exception
19
+ public void testPolymorphicArrayMapEmpty () throws Exception {
20
+ final ArrayListMultimap <String ,Object > multimap = ArrayListMultimap .create ();
21
+ multimap .put ("aKey" , 1 );
22
+ _testPolymorphicArrayMap (multimap );
23
+ }
24
+
25
+ public void testPolymorphicArrayMapNonEmpty () throws Exception {
26
+ _testPolymorphicArrayMap (ArrayListMultimap .create ());
27
+ }
28
+
29
+ private void _testPolymorphicArrayMap (ArrayListMultimap <String ,Object > multimap )
30
+ throws Exception
18
31
{
19
- final ObjectMapper mapper = mapperWithModule ();
20
- final ArrayListMultimap <String ,Object > multimap = ArrayListMultimap .create ();
21
- multimap .put ("aKey" , 1 );
22
32
final Outside104 outside = new Outside104 ();
23
33
outside .aProperty = multimap ;
24
- final String s = mapper .writeValueAsString (outside );
25
- Outside104 result = mapper .readValue (s , Outside104 .class );
34
+ final String json = MAPPER .writeValueAsString (outside );
35
+ Outside104 result = MAPPER .readValue (json , Outside104 .class );
26
36
assertNotNull (result );
27
37
}
28
38
}
You can’t perform that action at this time.
0 commit comments