code: protected void validateTargetType(Object entity) throws ODataProcessorException, ODataTargetTypeException {
          if (!getEntityDataModel().getType(
                  entity.getClass()).getFullyQualifiedName().equals(getTargetType().typeName())) {
              throw new ODataProcessorException(PROCESSOR_ERROR,
                      "Entity to persist does not match specified Resource name");
          }
      }
docs: Validates the target type.
  
  @param entity an entity
  @throws com.sdl.odata.api.processor.ODataProcessorException
  @throws com.sdl.odata.api.processor.datasource.ODataTargetTypeException