SbRestSfgTask extends SbRestAbstractTask { public SbRestSfgTask(RestOperation restOperation, ServiceFunctionGroup dataObject, ExecutorService odlExecutor) { super(restOperation, odlExecutor); this.exporterFactory = new SfgExporterFactory(); if (restOperation.equals(RestOperation.DELETE)) { this.jsonObject = exporterFactory.getExporter().exportJsonNameOnly(dataObject); } else { this.jsonObject = exporterFactory.getExporter().exportJson(dataObject); } setRestUriList(dataObject); } SbRestSfgTask(RestOperation restOperation, ServiceFunctionGroup dataObject, ExecutorService odlExecutor);   }
@Test public void testSbRestSfgTask() throws IOException { SbRestSfgTask sbRestSfgTask = new SbRestSfgTask(RestOperation.PUT, this.buildServiceFunctionGroup(), executorService); JsonNode jsonObject = mapper.readTree(sbRestSfgTask.jsonObject); assertNotNull("Must not be null", sbRestSfgTask.restUriList); assertTrue("Must be true", jsonObject.equals(this.buildServiceFunctionGroupObjectNode())); assertTrue("Must be true", sbRestSfgTask.restUriList.get(0).contains(REST_URI)); }