@Test
  public void usesQueryDslRepositoryIfInterfaceImplementsExecutor() {

    when(metadata.getJavaType()).thenReturn(User.class);
    assertEquals(
        QueryDslJpaRepository.class,
        factory.getRepositoryBaseClass(
            new DefaultRepositoryMetadata(QueryDslSampleRepository.class)));

    try {
      QueryDslSampleRepository repository = factory.getRepository(QueryDslSampleRepository.class);
      assertEquals(QueryDslJpaRepository.class, ((Advised) repository).getTargetClass());
    } catch (IllegalArgumentException e) {
      assertThat(
          e.getStackTrace()[0].getClassName(),
          is("org.springframework.data.querydsl.SimpleEntityPathResolver"));
    }
  }
 /**
  * Re-activate test. Change to check for {@link String} as OpenJpa defaults {@link Serializable}s
  * to {@link String}.
  */
 @Test
 public void reactivatedDetectsIdTypeForMappedSuperclass() {
   JpaEntityInformation<?, ?> information =
       JpaEntityInformationSupport.getMetadata(AbstractPersistable.class, em);
   assertEquals(String.class, information.getIdType());
 }