- /**
- * Tests when preprocessor step is not needed.
- */
- @Test
- @SuppressWarnings("unchecked")
- public void testStartOperationAsync_testStartPreprocessorAsyncNotNeeded() throws Exception {
- // pre-load the tenant data
- final StandardCoderObject data = preloadTenantData();
-
- // only need one response
- when(rawResponse.readEntity(String.class)).thenReturn(makeCqReply());
- when(webAsync.put(any(), any(InvocationCallback.class))).thenAnswer(provideResponse(rawResponse, 1));
-
- CompletableFuture<OperationOutcome> future2 = oper.start();
-
- assertEquals(OperationResult.SUCCESS, getResult(future2));
-
- // should not have replaced tenant response
- assertSame(data, context.getProperty(AaiGetTenantOperation.getKey(MY_VSERVER)));
-
- // custom query response should have been cached within the context
- AaiCqResponse cqData = context.getProperty(AaiCqResponse.CONTEXT_KEY);
- assertNotNull(cqData);
- }
-