### Question:
PathBuilder extends EntityPathBase<T> { public <A extends Enum<A>> EnumPath<A> getEnum(String property, Class<A> type) { validate(property, type); return super.createEnum(property, type); } PathBuilder(Class<? extends T> type, PathMetadata pathMetadata, PathBuilderValidator validator);  PathBuilder(Class<? extends T> type, PathMetadata pathMetadata);  PathBuilder(Class<? extends T> type, String variable, PathBuilderValidator validator);  PathBuilder(Class<? extends T> type, String variable); @Override Object getMetadata(Path<?> property); @SuppressWarnings("unchecked") PathBuilder<Object> get(String property); @SuppressWarnings("unchecked") PathBuilder<A> get(String property, Class<A> type); ArrayPath<A, E> getArray(String property, Class<A> type); BooleanPath get(BooleanPath path); BooleanPath getBoolean(String propertyName); CollectionPath<A, PathBuilder<A>> getCollection(String property, Class<A> type); CollectionPath<A, E> getCollection(String property, Class<A> type, Class<? super E> queryType); @SuppressWarnings("unchecked") ComparablePath<A> get(ComparablePath<A> path); @SuppressWarnings("unchecked") ComparablePath<A> getComparable(String property, Class<A> type); @SuppressWarnings("unchecked") DatePath<A> get(DatePath<A> path); @SuppressWarnings("unchecked") DatePath<A> getDate(String property, Class<A> type); @SuppressWarnings("unchecked") DateTimePath<A> get(DateTimePath<A> path); @SuppressWarnings("unchecked") DateTimePath<A> getDateTime(String property, Class<A> type); EnumPath<A> getEnum(String property, Class<A> type); @SuppressWarnings("unchecked") EnumPath<A> get(EnumPath<A> path); ListPath<A, PathBuilder<A>> getList(String property, Class<A> type); ListPath<A, E> getList(String property, Class<A> type, Class<? super E> queryType); MapPath<K, V, PathBuilder<V>> getMap(String property, Class<K> key, Class<V> value); MapPath<K, V, E> getMap(String property, Class<K> key, Class<V> value, Class<? super E> queryType); @SuppressWarnings("unchecked") NumberPath<A> get(NumberPath<A> path); @SuppressWarnings("unchecked") NumberPath<A> getNumber(String property, Class<A> type); SetPath<A, PathBuilder<A>> getSet(String property, Class<A> type); SetPath<A, E> getSet(String property, Class<A> type, Class<? super E> queryType); @SuppressWarnings("unchecked") SimplePath<A> get(Path<A> path); @SuppressWarnings("unchecked") SimplePath<A> getSimple(String property, Class<A> type); StringPath get(StringPath path); StringPath getString(String property); @SuppressWarnings("unchecked") TimePath<A> get(TimePath<A> path); @SuppressWarnings("unchecked") TimePath<A> getTime(String property, Class<A> type);  }### Answer:
@Test public void getEnum() { PathBuilder<User> entityPath = new PathBuilder<User>(User.class, "entity"); EnumPath<Gender> enumPath = entityPath.getEnum("gender", Gender.class); assertNotNull(enumPath.ordinal()); assertEquals(enumPath, entityPath.get(enumPath)); }