@Test public void a_scan_uuid_can_be_extracted() throws Exception { String data = "{\"scan_uuid\":\"8b0e5c15-7958-0480-28d9-7c5a7069a9f892b6b6880a8600b5\"}"; String scan_uuid = adapterToTest.extractScanUUID(context, data); assertEquals(scan_uuid,"8b0e5c15-7958-0480-28d9-7c5a7069a9f892b6b6880a8600b5"); }
String extractScanUUID(NessusAdapterContext context, String body) throws AdapterException { String scanUUID = context.json().fetch("scan_uuid", body).asText(); LOG.debug("{} resulted scanId uuid '{}'", getAdapterLogId(context), scanUUID); return scanUUID; }
NessusAdapterV1 extends AbstractAdapter<NessusAdapterContext, NessusAdapterConfig> implements NessusAdapter { String extractScanUUID(NessusAdapterContext context, String body) throws AdapterException { String scanUUID = context.json().fetch("scan_uuid", body).asText(); LOG.debug("{} resulted scanId uuid '{}'", getAdapterLogId(context), scanUUID); return scanUUID; } }
NessusAdapterV1 extends AbstractAdapter<NessusAdapterContext, NessusAdapterConfig> implements NessusAdapter { String extractScanUUID(NessusAdapterContext context, String body) throws AdapterException { String scanUUID = context.json().fetch("scan_uuid", body).asText(); LOG.debug("{} resulted scanId uuid '{}'", getAdapterLogId(context), scanUUID); return scanUUID; }  }
NessusAdapterV1 extends AbstractAdapter<NessusAdapterContext, NessusAdapterConfig> implements NessusAdapter { String extractScanUUID(NessusAdapterContext context, String body) throws AdapterException { String scanUUID = context.json().fetch("scan_uuid", body).asText(); LOG.debug("{} resulted scanId uuid '{}'", getAdapterLogId(context), scanUUID); return scanUUID; }  @Override String execute(NessusAdapterConfig config,AdapterRuntimeContext runtimeContext); @Override int getAdapterVersion(); }
NessusAdapterV1 extends AbstractAdapter<NessusAdapterContext, NessusAdapterConfig> implements NessusAdapter { String extractScanUUID(NessusAdapterContext context, String body) throws AdapterException { String scanUUID = context.json().fetch("scan_uuid", body).asText(); LOG.debug("{} resulted scanId uuid '{}'", getAdapterLogId(context), scanUUID); return scanUUID; }  @Override String execute(NessusAdapterConfig config,AdapterRuntimeContext runtimeContext); @Override int getAdapterVersion();  }