From 2cb2bbc6a5e69fbafd0fc2f6605d301b96376ca9 Mon Sep 17 00:00:00 2001 From: Daniel McCoy Stephenson Date: Wed, 29 Mar 2023 09:03:37 -0600 Subject: [PATCH] Added a unit test for depositing a tim with extra properties. --- .../dot/its/jpo/ode/traveler/TimDepositControllerTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/traveler/TimDepositControllerTest.java b/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/traveler/TimDepositControllerTest.java index e76cd0ced..7bf56b99a 100644 --- a/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/traveler/TimDepositControllerTest.java +++ b/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/traveler/TimDepositControllerTest.java @@ -160,4 +160,11 @@ public void testSuccessfulMessageReturnsSuccessMessagePut(@Capturing TimTransmog assertEquals("{\"success\":\"true\"}", actualResponse.getBody()); } + @Test + public void testDepositingTimWithExtraProperties(@Capturing TimTransmogrifier capturingTimTransmogrifier, @Capturing XmlUtils capturingXmlUtils) { + String timToSubmit = "{\"request\":{\"rsus\":[],\"snmp\":{},\"randomProp1\":true,\"randomProp2\":\"hello world\"},\"tim\":{\"msgCnt\":\"13\",\"timeStamp\":\"2017-03-13T01:07:11-05:00\",\"randomProp3\":123,\"randomProp4\":{\"nestedProp1\":\"foo\",\"nestedProp2\":\"bar\"}}}"; + ResponseEntity actualResponse = testTimDepositController.postTim(timToSubmit); + assertEquals("{\"success\":\"true\"}", actualResponse.getBody()); + } + }