### Question:
ChamberOfCommerceCodeLookUpService { OrganisationNameNumberViewModel findCandidateForFranceByCode(final String code) { try { SirenResult sirenResult = sirenService.getCompanyName(code); if (sirenResult != null) { return new OrganisationNameNumberViewModel(sirenResult.getCompanyName(), code, sirenResult.getEntryDate()); } else { messageService.warnUser(NO_RESULTS_WARNING); } } catch (ClientProtocolException e) { messageService.warnUser(CONNECTION_WARNING); } return null; }  List<OrganisationNameNumberViewModel> getChamberOfCommerceCodeCandidatesByOrganisation(final Organisation organisation); List<OrganisationNameNumberViewModel> getChamberOfCommerceCodeCandidatesByOrganisation(final String name, final String atPath); OrganisationNameNumberViewModel getChamberOfCommerceCodeCandidatesByCode(final Organisation organisation); OrganisationNameNumberViewModel getChamberOfCommerceCodeCandidatesByCode(final String code, final String atPath); static final List<String> LEGAL_FORMS; }### Answer:
@Test public void find_Candidate_For_France_By_Code_works_when_no_result() throws Exception { ChamberOfCommerceCodeLookUpService service = new ChamberOfCommerceCodeLookUpService(); service.messageService = mockMessageService; service.sirenService = mockSirenService; String noResultsWarning = "A connection to the external Siren service could be made, but no results were returned"; context.checking(new Expectations(){{ oneOf(mockSirenService).getCompanyName("some cocc that returns no results"); will(returnValue(null)); allowing(mockMessageService).warnUser(noResultsWarning); }}); service.findCandidateForFranceByCode("some cocc that returns no results"); }