@Test public void when_no_exception_is_thrown_result_has_not_failed() throws Exception { DomainMessageSynchronousResult result = serviceToTest.receiveSynchronMessage(prepareValidRequest()); assertFalse(result.hasFailed()); }
@Override @IsRecevingSyncMessage(MessageID.START_SCAN) public DomainMessageSynchronousResult receiveSynchronMessage(DomainMessage request) { notNull(request, "Request may not be null!"); if (!request.hasID(MessageID.START_SCAN)) { return new DomainMessageSynchronousResult(MessageID.UNSUPPORTED_OPERATION, new UnsupportedOperationException("Can only handle " + MessageID.START_SCAN)); } return startScan(request); }
ScanService implements SynchronMessageHandler { @Override @IsRecevingSyncMessage(MessageID.START_SCAN) public DomainMessageSynchronousResult receiveSynchronMessage(DomainMessage request) { notNull(request, "Request may not be null!"); if (!request.hasID(MessageID.START_SCAN)) { return new DomainMessageSynchronousResult(MessageID.UNSUPPORTED_OPERATION, new UnsupportedOperationException("Can only handle " + MessageID.START_SCAN)); } return startScan(request); } }
ScanService implements SynchronMessageHandler { @Override @IsRecevingSyncMessage(MessageID.START_SCAN) public DomainMessageSynchronousResult receiveSynchronMessage(DomainMessage request) { notNull(request, "Request may not be null!"); if (!request.hasID(MessageID.START_SCAN)) { return new DomainMessageSynchronousResult(MessageID.UNSUPPORTED_OPERATION, new UnsupportedOperationException("Can only handle " + MessageID.START_SCAN)); } return startScan(request); }  }
ScanService implements SynchronMessageHandler { @Override @IsRecevingSyncMessage(MessageID.START_SCAN) public DomainMessageSynchronousResult receiveSynchronMessage(DomainMessage request) { notNull(request, "Request may not be null!"); if (!request.hasID(MessageID.START_SCAN)) { return new DomainMessageSynchronousResult(MessageID.UNSUPPORTED_OPERATION, new UnsupportedOperationException("Can only handle " + MessageID.START_SCAN)); } return startScan(request); }  @Override @IsRecevingSyncMessage(MessageID.START_SCAN) DomainMessageSynchronousResult receiveSynchronMessage(DomainMessage request); }
ScanService implements SynchronMessageHandler { @Override @IsRecevingSyncMessage(MessageID.START_SCAN) public DomainMessageSynchronousResult receiveSynchronMessage(DomainMessage request) { notNull(request, "Request may not be null!"); if (!request.hasID(MessageID.START_SCAN)) { return new DomainMessageSynchronousResult(MessageID.UNSUPPORTED_OPERATION, new UnsupportedOperationException("Can only handle " + MessageID.START_SCAN)); } return startScan(request); }  @Override @IsRecevingSyncMessage(MessageID.START_SCAN) DomainMessageSynchronousResult receiveSynchronMessage(DomainMessage request);  }