@Test public void when_context_has_scanid_123456_the_createLaunchApiURL_returns_host_slash_scans_slash_123456_slash_launch() { when(context.getNessusScanId()).thenReturn(123456L); when(config.getProductBaseURL()).thenReturn("https: String result = adapterToTest.createLaunchApiURL(context); assertEquals("https: }
String createLaunchApiURL(NessusAdapterContext context) { String part = MessageFormat.format(MSG_APICALL_LAUNCH_SCAN, Long.toString(context.getNessusScanId())); return createAPIURL(part, context); }
NessusAdapterV1 extends AbstractAdapter<NessusAdapterContext, NessusAdapterConfig> implements NessusAdapter { String createLaunchApiURL(NessusAdapterContext context) { String part = MessageFormat.format(MSG_APICALL_LAUNCH_SCAN, Long.toString(context.getNessusScanId())); return createAPIURL(part, context); } }
NessusAdapterV1 extends AbstractAdapter<NessusAdapterContext, NessusAdapterConfig> implements NessusAdapter { String createLaunchApiURL(NessusAdapterContext context) { String part = MessageFormat.format(MSG_APICALL_LAUNCH_SCAN, Long.toString(context.getNessusScanId())); return createAPIURL(part, context); }  }
NessusAdapterV1 extends AbstractAdapter<NessusAdapterContext, NessusAdapterConfig> implements NessusAdapter { String createLaunchApiURL(NessusAdapterContext context) { String part = MessageFormat.format(MSG_APICALL_LAUNCH_SCAN, Long.toString(context.getNessusScanId())); return createAPIURL(part, context); }  @Override String execute(NessusAdapterConfig config,AdapterRuntimeContext runtimeContext); @Override int getAdapterVersion(); }
NessusAdapterV1 extends AbstractAdapter<NessusAdapterContext, NessusAdapterConfig> implements NessusAdapter { String createLaunchApiURL(NessusAdapterContext context) { String part = MessageFormat.format(MSG_APICALL_LAUNCH_SCAN, Long.toString(context.getNessusScanId())); return createAPIURL(part, context); }  @Override String execute(NessusAdapterConfig config,AdapterRuntimeContext runtimeContext); @Override int getAdapterVersion();  }