@Test public void createSteps() throws WorkerNotFoundClientException, WorkerServerClientException { WorkerClientFactory.changeMode(null); final WorkerClient client = WorkerClientFactory.getInstance(null) .getClient(); final Step step = new Step(); final DefaultWorkerParameters workParams = WorkerParametersFactory.newWorkerParameters(); final DescriptionStep descriptionStep = new DescriptionStep(step, workParams); final String requestId = "requestId"; final ItemStatus result = client.submitStep(descriptionStep); assertNotNull(result); assertEquals(result.getItemsStatus().size(), 1); }
@Override public ItemStatus submitStep(DescriptionStep data) throws WorkerNotFoundClientException, WorkerServerClientException { final ItemStatus mockResponse = new ItemStatus("StepId"); final ItemStatus itemStatus = new ItemStatus("ItemId"); itemStatus.setMessage("message"); final StatusCode status = StatusCode.OK; itemStatus.increment(status); mockResponse.setItemsStatus("ItemId", itemStatus); return mockResponse; }
WorkerClientMock extends AbstractMockClient implements WorkerClient { @Override public ItemStatus submitStep(DescriptionStep data) throws WorkerNotFoundClientException, WorkerServerClientException { final ItemStatus mockResponse = new ItemStatus("StepId"); final ItemStatus itemStatus = new ItemStatus("ItemId"); itemStatus.setMessage("message"); final StatusCode status = StatusCode.OK; itemStatus.increment(status); mockResponse.setItemsStatus("ItemId", itemStatus); return mockResponse; } }
WorkerClientMock extends AbstractMockClient implements WorkerClient { @Override public ItemStatus submitStep(DescriptionStep data) throws WorkerNotFoundClientException, WorkerServerClientException { final ItemStatus mockResponse = new ItemStatus("StepId"); final ItemStatus itemStatus = new ItemStatus("ItemId"); itemStatus.setMessage("message"); final StatusCode status = StatusCode.OK; itemStatus.increment(status); mockResponse.setItemsStatus("ItemId", itemStatus); return mockResponse; }  }
WorkerClientMock extends AbstractMockClient implements WorkerClient { @Override public ItemStatus submitStep(DescriptionStep data) throws WorkerNotFoundClientException, WorkerServerClientException { final ItemStatus mockResponse = new ItemStatus("StepId"); final ItemStatus itemStatus = new ItemStatus("ItemId"); itemStatus.setMessage("message"); final StatusCode status = StatusCode.OK; itemStatus.increment(status); mockResponse.setItemsStatus("ItemId", itemStatus); return mockResponse; }  @Override ItemStatus submitStep(DescriptionStep data); }
WorkerClientMock extends AbstractMockClient implements WorkerClient { @Override public ItemStatus submitStep(DescriptionStep data) throws WorkerNotFoundClientException, WorkerServerClientException { final ItemStatus mockResponse = new ItemStatus("StepId"); final ItemStatus itemStatus = new ItemStatus("ItemId"); itemStatus.setMessage("message"); final StatusCode status = StatusCode.OK; itemStatus.increment(status); mockResponse.setItemsStatus("ItemId", itemStatus); return mockResponse; }  @Override ItemStatus submitStep(DescriptionStep data);  }