### Question:
LanguageService implements ILanguageService { protected LanguageDto disableLang(String code) { try { Lang sysLang = this.getLangManager().getAssignableLangs().stream().filter(i -> i.getCode().equals(code)).findFirst().orElse(null); if (null == sysLang) { logger.warn("no lang found with code {}", code); throw new ResourceNotFoundException(LanguageValidator.ERRCODE_LANGUAGE_DOES_NOT_EXISTS, "language", code); } Lang lang = this.getLangManager().getLang(code); if (null != this.getLangManager().getLang(code)) { BeanPropertyBindingResult validations = this.validateDisable(lang); if (validations.hasErrors()) { throw new ValidationConflictException(validations); } } this.getLangManager().removeLang(code); return this.getLanguageDtoBuilder().convert(sysLang); } catch (ApsSystemException ex) { throw new RestServerError("error disabling language " + code, ex); } }  void setLangManager(ILangManager langManager); @PostConstruct void setUpDto(); @Override PagedMetadata<LanguageDto> getLanguages(RestListRequest requestList); @Override LanguageDto getLanguage(String code); @Override LanguageDto updateLanguage(String code, boolean status);  }### Answer:
@Test(expected = ResourceNotFoundException.class) public void shouldFailDisabilingUnexistingLang() { languageService.disableLang("xx"); }