[BUG] Correctly parse observedTimestamp 41/137841/6
authormpriyank <priyank.maheshwari@est.tech>
Fri, 3 May 2024 12:45:03 +0000 (13:45 +0100)
committermpriyank <priyank.maheshwari@est.tech>
Fri, 3 May 2024 14:35:11 +0000 (15:35 +0100)
commite834c9345da1819613044c423d6cd3a096aad55e
tree4edbe1aa223fd49ef0f875b1bf5cbe9a4deefa8d
parentc5f6c45eb5cd94f76f1f39e5a4593996a9f25474
[BUG] Correctly parse observedTimestamp

- Using the DateTimeUtility to parse the passed OffsetDateTime and using
  it for conversion to string
- Moving to actual src/main/java from test side as it is to be used in
  the prod code as well and only keeping the methods in use.
- Added test to fix the coverage issue

Issue-ID: CPS-2211
Change-Id: I2b4325bb77a6da7fd470986b1da293f455650375
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
cps-rest/src/test/java/org/onap/cps/utils/DateTimeUtility.java
cps-service/src/main/java/org/onap/cps/events/CpsDataUpdateEventsService.java
cps-service/src/main/java/org/onap/cps/utils/DateTimeUtility.java [moved from cps-service/src/test/java/org/onap/cps/utils/DateTimeUtility.java with 79% similarity]
cps-service/src/test/groovy/org/onap/cps/events/CpsDataUpdateEventsServiceSpec.groovy