aboutsummaryrefslogtreecommitdiffstats
path: root/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/YamlMessageBodyHandlerTest.java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-09-13 12:14:25 -0400
committerJim Hahn <jrh3@att.com>2019-09-13 17:40:29 -0400
commitaf2e4018c92b0fb311f60dfe507335b12e2935a4 (patch)
tree62705712e2a88682e17bdd9fef248e866c7407e4 /policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/YamlMessageBodyHandlerTest.java
parent63922e3dc9101f019cb490f6c5d02991c10fcdf5 (diff)
Extract YamlJsonTranslator from StandardYamlCoder
Refactored StandardYamlCoder, extracting a new class, YamlJsonTranslator, from it. This facilitates performing yaml translation when not using a standard "gson" coder. Added YamlJacksonHandler which supports YAML translation layered on top of a JacksonHandler instead of a GsonMessageBodyHandler. Also added junit tests to complete coverage of StandardCoder. Also added public APPLICATION_YAML to YamlMessageBodyHandler. Change-Id: Ia470fa194661fbf1aebeaf0f18b57f2a984cb64b Issue-ID: POLICY-2081 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/YamlMessageBodyHandlerTest.java')
-rw-r--r--policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/YamlMessageBodyHandlerTest.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/YamlMessageBodyHandlerTest.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/YamlMessageBodyHandlerTest.java
index 0ddad0bf..70b620c0 100644
--- a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/YamlMessageBodyHandlerTest.java
+++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/YamlMessageBodyHandlerTest.java
@@ -117,7 +117,7 @@ public class YamlMessageBodyHandlerTest {
MyObject obj1 = new MyObject(10);
assertThatThrownBy(() -> hdlr.writeTo(obj1, obj1.getClass(), CLASS_OBJ, null, null, null, outstr))
- .isInstanceOf(IOException.class);
+ .isInstanceOf(YAMLException.class);
outstr.close();
}