### Question:
ChamberOfCommerceCodeLookUpService { String filterLegalFormsFromOrganisationName(final String name ) { return Arrays.stream(name.split(" ")) .filter(element -> !LEGAL_FORMS.contains(element)) .filter(element -> !LEGAL_FORMS.contains(element.replace(".", ""))) .collect(Collectors.joining(" ")); }  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 filterLegalFormsFromOrganisationName_works() throws Exception { ChamberOfCommerceCodeLookUpService service = new ChamberOfCommerceCodeLookUpService(); final String legalForm_SA_without_occurrence_in_name_1 = "SA ACME"; final String legalForm_SA_without_occurrence_in_name_2 = "ACME SA"; final String legalForm_SA_without_occurrence_in_name_with_dots = "ACME S.A.S"; final String legalForm_SA_with_occurrence_in_name = "SACME SA"; Assertions.assertThat(service.filterLegalFormsFromOrganisationName(legalForm_SA_without_occurrence_in_name_1)).isEqualTo("ACME"); Assertions.assertThat(service.filterLegalFormsFromOrganisationName(legalForm_SA_without_occurrence_in_name_2)).isEqualTo("ACME"); Assertions.assertThat(service.filterLegalFormsFromOrganisationName(legalForm_SA_without_occurrence_in_name_with_dots)).isEqualTo("ACME"); Assertions.assertThat(service.filterLegalFormsFromOrganisationName(legalForm_SA_with_occurrence_in_name)).isEqualTo("SACME"); }