SbRestSfstateTask extends SbRestAbstractTask { public SbRestSfstateTask(RestOperation restOperation, ServiceFunctionState dataObject, ExecutorService odlExecutor) { super(restOperation, odlExecutor); this.exporterFactory = new SfstateExporterFactory(); if (restOperation.equals(RestOperation.DELETE)) { this.jsonObject = exporterFactory.getExporter().exportJsonNameOnly(dataObject); } else { this.jsonObject = exporterFactory.getExporter().exportJson(dataObject); } setRestUriList(dataObject); } SbRestSfstateTask(RestOperation restOperation, ServiceFunctionState dataObject, ExecutorService odlExecutor);   }
@Test public void testSbRestSfstateTask() throws IOException { SbRestSfstateTask sbRestSfstateTask = new SbRestSfstateTask(RestOperation.PUT, this.buildServiceFunctionState(), executorService); JsonNode jsonObject = mapper.readTree(sbRestSfstateTask.jsonObject); assertTrue("Must be true", jsonObject.equals(this.buildServiceFunctionStateObjectNode())); assertTrue("Must be true", sbRestSfstateTask.restUriList.get(0).contains(REST_URI)); }