+
+ @Test
+ public void testCvaasFileNameAndFileContentToContext() throws Exception {
+
+ JsonDgUtilImpl jsonDgUtil = new JsonDgUtilImpl();
+ String key1 = "running-config.upload-date";
+ String testValueKey1 = "2004-02-09 00:00:00:000";
+ Long epochUploadTimestamp = DATE_TIME_PARSER_THREAD_LOCAL.get().parse(testValueKey1).getTime();
+ SvcLogicContext ctx = new SvcLogicContext();
+ Map<String, String> params = new HashMap<>();
+ ctx.setAttribute(key1, testValueKey1);
+ jsonDgUtil.cvaasFileNameAndFileContentToContext(params, ctx);
+ assertNotNull(ctx.getAttribute("cvaas-file-content"));
+ assertTrue(ctx.getAttribute("cvaas-file-content").contains(epochUploadTimestamp.toString()));
+ }