### Question:
TargetTypesServiceImpl implements TargetTypesService { @Override public List<String> getAllTargetTypesCategories() { return config.getTargetTypes().getCategories(); }  @Override Collection<String> getTargetTypesNamesByDataSourceName(final String dataSourceName); @Override List<TargetTypes> getAllTargetTypesByDomainList(final List<String> domains); @Override Page<TargetTypesProjections> getAllTargetTypeDetails(String searchTerm, int page, int size); @Override List<String> getAllTargetTypesCategories(); @Override List<TargetTypesDetails> getAllTargetTypes(List<AssetGroupTargetTypes> selectedTargetTypes); @Override List<TargetTypeAttribute> getTargetTypeAttributes(final List<TargetTypes> targetTypes); @Override Map<String, Object> getAttributeValues(AttributeValuesRequest attributeValuesRequest); @Override TargetTypes getTargetTypesByName(String targetTypeName); @Override String updateTargetTypeDetails(CreateUpdateTargetTypeDetailsRequest targetTypesDetails, final String userId); @Override String addTargetTypeDetails(final CreateUpdateTargetTypeDetailsRequest targetTypeDetailsRequest, final String userId); @Override void deleteIndex(String targetTypeIndex);  }### Answer:
@Test public void getAllTargetTypesCategoriesTest() { List<String> categories = Lists.newArrayList(); categories.add("Category123"); TargetTypesProperty targetTypesProperty = new TargetTypesProperty(); targetTypesProperty.setCategories(categories); when(config.getTargetTypes()).thenReturn(targetTypesProperty); assertThat(targetTypesService.getAllTargetTypesCategories().get(0), is("Category123")); }