HibernateSearchService { boolean isIndexedEntity(Class<?> entityType) { return Objects.nonNull(entityType.getAnnotation(Entity.class)) && Objects.nonNull(entityType.getAnnotation(Indexed.class)); } HibernateSearchService(@NotNull Collection<String> statusWithLobConstraint, @NotNull Collection<String> excludedStatus); @SuppressWarnings("unchecked") List<Project> searchProjects(@NonNull String simpleQueryString, String lob); @SuppressWarnings("unchecked") Page<Project> searchProjects(@NonNull String simpleQueryString, @NonNull Pageable pageable, String lob); @SuppressWarnings("unchecked") List<UserData> searchUserData(@NonNull List<User> users, @NonNull String simpleQueryString);  }
@Test public void isIndexedEntityReturnsFalseWhenNotAnEntity() { assertThat(hibernateSearchService.isIndexedEntity(String.class)).isFalse(); }
@Test public void isIndexedEntityReturnsFalseWhenEntityNotIndexed() { assertThat(hibernateSearchService.isIndexedEntity(NonIndexedEntity.class)).isFalse(); }
@Test public void isIndexedEntityReturnsTrueWhenEntityIsIndexed() { assertThat(hibernateSearchService.isIndexedEntity(IndexedEntity.class)).isTrue(); }