@Test(expected = UnsupportedOperationException.class)
  public void createsProxyWithCustomBaseClass() {

    JpaRepositoryFactory factory = new CustomGenericJpaRepositoryFactory(entityManager);
    UserCustomExtendedRepository repository =
        factory.getRepository(UserCustomExtendedRepository.class);

    repository.customMethod(1);
  }
  @Test(expected = UnsupportedOperationException.class)
  public void testCustomFactoryUsed() {

    Assert.notNull(userRepository);
    userRepository.customMethod(1);
  }