### Question:
ServiceConverter { public ClientId parseClientId(String encodedId) { validateEncodedString(encodedId); String encodedClientId = encodedId.substring(0, encodedId.lastIndexOf( ENCODED_ID_SEPARATOR)); return clientConverter.convertId(encodedClientId); } @Autowired  ServiceConverter(ClientConverter clientConverter); List<Service> convertServices(Iterable<ServiceType> serviceTypes, ClientId clientId); Service convert(ServiceType serviceType, ClientId clientId); String convertId(ServiceType serviceType, ClientId clientId); ClientId parseClientId(String encodedId); String parseFullServiceCode(String encodedId); static final int FULL_SERVICE_CODE_INDEX; }### Answer:
@Test(expected = BadRequestException.class) public void convertBadStringIdClientId() throws Exception { serviceConverter.parseClientId("XRD2:GOV:M4:SS1:aa:asd"); }
@Test(expected = BadRequestException.class) public void convertBadStringId2ClientId() throws Exception { serviceConverter.parseClientId("XRD2:GOV:M4:SS1"); }