SbRestSfTask extends SbRestAbstractTask { public SbRestSfTask(RestOperation restOperation, ServiceFunction dataObject, ExecutorService odlExecutor) { super(restOperation, odlExecutor); this.exporterFactory = new SfExporterFactory(); if (restOperation.equals(RestOperation.DELETE)) { this.jsonObject = exporterFactory.getExporter().exportJsonNameOnly(dataObject); } else { this.jsonObject = exporterFactory.getExporter().exportJson(dataObject); } setRestUriList(dataObject); } SbRestSfTask(RestOperation restOperation, ServiceFunction dataObject, ExecutorService odlExecutor);   }
@Test public void testSbRestSfTask() throws IOException { SbRestSfTask sbRestSfTask = new SbRestSfTask(RestOperation.PUT, this.buildServiceFunction(), executorService); JsonNode jsonObject = mapper.readTree(sbRestSfTask.jsonObject); assertTrue("Must be true", jsonObject.equals(this.buildServiceFunctionObjectNode())); assertTrue("Must be true", sbRestSfTask.restUriList.get(0).contains(REST_URI)); }