code: public static Class<?> resolveRepositoryClass(final Object repository) {
          Class<?> result = repository.getClass();
          if (result.getName().contains("$$EnhancerByGuice")) {
              result = result.getSuperclass();
          }
          if (result.getName().contains(DynamicClassGenerator.DYNAMIC_CLASS_POSTFIX)) {
              result = result.getSuperclass() == Object.class ? result.getInterfaces()[0] : result.getSuperclass();
          }
          return result;
      }
docs: Resolves repository class from repository instance.
  Method is aware of guice proxies and guice-ext-annotations dynamic class proxies (used to make interface
  or abstract type normal class).
  
  @param repository repository instance
  @return base repository type