@@ -28,13 +28,12 @@ static class Third {
28
28
/**********************************************************************
29
29
*/
30
30
31
- protected final ObjectMapper MAPPER = jsonMapperBuilder ().build ();
32
-
33
31
public void testPojoMixinDeserialization () throws Exception {
34
- ObjectMapper mxMapper = MAPPER
32
+ ObjectMapper mxMapper = jsonMapperBuilder ()
35
33
.addMixIn (First .class , Second .class )
36
34
.addMixIn (Second .class , Third .class )
37
- .addMixIn (Third .class , First .class );
35
+ .addMixIn (Third .class , First .class )
36
+ .build ();
38
37
39
38
// first deserialized from second
40
39
First first = mxMapper .readValue (a2q ("{'second-mixin':'second-mixin'}" ), First .class );
@@ -50,10 +49,11 @@ public void testPojoMixinDeserialization() throws Exception {
50
49
}
51
50
52
51
public void testPojoMixinSerialization () throws Exception {
53
- ObjectMapper mxMapper = MAPPER
52
+ ObjectMapper mxMapper = jsonMapperBuilder ()
54
53
.addMixIn (First .class , Second .class )
55
54
.addMixIn (Second .class , Third .class )
56
- .addMixIn (Third .class , First .class );
55
+ .addMixIn (Third .class , First .class )
56
+ .build ();
57
57
58
58
// first serialized as second
59
59
First firstBean = new First ();
0 commit comments