diff options
Diffstat (limited to 'keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/TokenTest.java')
-rw-r--r-- | keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/TokenTest.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/TokenTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/TokenTest.java index 170f0b4..5fd13ef 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/TokenTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/TokenTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.keystone.model.authentication; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; import com.woorea.openstack.keystone.model.authentication.TokenAuthentication.Token; -import org.codehaus.jackson.map.DeserializationConfig; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.SerializationConfig; -import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion; + import org.junit.Assert; import org.junit.Test; import org.skyscreamer.jsonassert.JSONAssert; @@ -39,9 +40,10 @@ public class TokenTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { |