### Question:
ContentTypeService extends AbstractEntityTypeService<Content, ContentTypeDto> implements IComponentUsageService { @Override public Integer getComponentUsage(String componentCode) { try { return contentService.countContentsByType(componentCode); } catch (ResourceNotFoundException e) { return 0; } }  ContentTypeDto create(ContentTypeDtoRequest contentType, BindingResult bindingResult); void delete(String code); PagedMetadata<EntityTypeShortDto> findMany(RestListRequest listRequest); Optional<ContentTypeDto> findOne(String code); ContentTypeDto update(ContentTypeDtoRequest contentTypeRequest, BindingResult bindingResult); PagedMetadata<String> findManyAttributes(RestListRequest requestList); AttributeTypeDto getAttributeType(String attributeCode); List<EntityTypeAttributeFullDto> getContentTypeAttributes(String contentTypeCode); EntityTypeAttributeFullDto getContentTypeAttribute(String contentTypeCode, String attributeCode); EntityTypeAttributeFullDto addContentTypeAttribute(
            String contentTypeCode,
            EntityTypeAttributeFullDto bodyRequest,
            BindingResult bindingResult); EntityTypeAttributeFullDto updateContentTypeAttribute(
            String contentTypeCode,
            EntityTypeAttributeFullDto bodyRequest,
            BindingResult bindingResult); void deleteContentTypeAttribute(String contentTypeCode, String attributeCode); void reloadContentTypeReferences(String contentTypeCode); EntityTypesStatusDto getContentTypesRefreshStatus(); void moveContentTypeAttributeUp(String contentTypeCode, String attributeCode); void moveContentTypeAttributeDown(String contentTypeCode, String attributeCode); Map<String, Integer> reloadProfileTypesReferences(List<String> profileTypeCodes); @Override Integer getComponentUsage(String componentCode); @Override PagedMetadata<ComponentUsageEntity> getComponentUsageDetails(String componentCode, RestListRequest restListRequest);  }### Answer:
@Test public void getContentTypeUsageForNonExistingCodeShouldReturnZero() { int componentUsage = contentTypeService.getComponentUsage("not_existing"); assertEquals(0, componentUsage); }