public void testSenderDoesNotSendInvalidQuery() throws InterruptedException, ExecutionException { BLASTQuery query = anInvalidPendingBLASTQuery(); sender.execute(query); Integer numberSent = sender.get(); assertThat("Expected no query to be send", numberSent, is(0)); assertThat("The BLAST query's status should be draft", query.getStatus(), is(Status.DRAFT)); }
public void testSenderSendsAValidQuery() throws InterruptedException, ExecutionException { BLASTQuery query = aValidPendingBLASTQuery(); sender.execute(query); Integer numberSent = sender.get(); assertThat("Expected the number of queries sent to be more than 1", numberSent, is(1)); assertThat( "The BLAST query's identifier should be set", query.getJobIdentifier(), is(not(nullValue()))); }