### Question:
ForkRequestProcessor extends RequestProcessor { protected void submit( Request request, String sourceName ) { assert request != null; CompositeRequestChannel channel = channelBySourceName.get(sourceName); if (channel == null) { channel = new CompositeRequestChannel(sourceName); channelBySourceName.put(sourceName, channel); channel.start(executor, getExecutionContext(), connectionFactory); } channel.add(request); } ForkRequestProcessor( FederatedRepository repository,
                                 ExecutionContext context,
                                 DateTime now,
                                 Queue<FederatedRequest> federatedRequestQueue ); void await(); @Override void process( VerifyNodeExistsRequest request ); @Override void process( ReadNodeRequest request ); @Override void process( ReadAllChildrenRequest request ); @Override void process( ReadBlockOfChildrenRequest request ); @Override void process( ReadNextBlockOfChildrenRequest request ); @Override void process( ReadAllPropertiesRequest request ); @Override void process( ReadPropertyRequest request ); @Override void process( ReadBranchRequest request ); @Override void process( CreateNodeRequest request ); @Override void process( RemovePropertyRequest request ); @Override void process( UpdatePropertiesRequest request ); @Override void process( UpdateValuesRequest request ); @Override void process( SetPropertyRequest request ); @Override void process( DeleteChildrenRequest request ); @Override void process( DeleteBranchRequest request ); @Override void process( CopyBranchRequest request ); @Override void process( CloneBranchRequest request ); @Override void process( MoveBranchRequest request ); @Override void process( RenameNodeRequest request ); @Override void process( LockBranchRequest request ); @Override void process( UnlockBranchRequest request ); @Override void process( VerifyWorkspaceRequest request ); @Override void process( GetWorkspacesRequest request ); @Override void process( CreateWorkspaceRequest request ); @Override void process( CloneWorkspaceRequest request ); @Override void process( DestroyWorkspaceRequest request ); @Override void process( AccessQueryRequest request ); @Override void process( FullTextSearchRequest request ); @Override void close();  }### Answer:
@Test public void shouldSubmitFederatedRequestToQueueIfFederatedRequestHasNoIncompleteRequests() { FederatedRequest request = mock(FederatedRequest.class); when(request.hasIncompleteRequests()).thenReturn(false); processor.submit(request); assertThat(federatedRequests.size(), is(1)); assertThat(federatedRequests.get(0), is(sameInstance(request))); }