### Question:
BaseProperty implements Property<E> { @SuppressWarnings("unchecked") public E getFrom(Object bean) { return (E) PropertyUtils.getProperty(bean, getName()); } @SuppressWarnings({"unchecked", "Convert2Lambda", "Anonymous2MethodRef"}) protected  BaseProperty(String name, Expression expression, Class<? super E> type); String getName(); String getAlias(); Expression getExpression(); @Override int hashCode(); @Override boolean equals(Object o); @Deprecated Expression path(); Expression isNull(); Expression isNotNull(); Ordering asc(); Orderings ascs(); Ordering ascInsensitive(); Orderings ascInsensitives(); Ordering desc(); Orderings descs(); Ordering descInsensitive(); Orderings descInsensitives(); @SuppressWarnings("unchecked") E getFrom(Object bean); List<E> getFromAll(Collection<?> beans); void setIn(Object bean, E value); void setInAll(Collection<?> beans, E value); NumericProperty<Long> count(); NumericProperty<Long> countDistinct(); BaseProperty<E> alias(String alias); Class<E> getType(); Expression isTrue(); Expression isFalse(); Expression eq(E value); Expression eq(BaseProperty<?> value); Expression ne(E value); Expression ne(BaseProperty<?> value); Expression in(E firstValue, E... moreValues); Expression nin(E firstValue, E... moreValues); Expression in(Collection<E> values); Expression nin(Collection<E> values); Expression in(ColumnSelect<? extends E> subquery); Expression nin(ColumnSelect<? extends E> subquery); BaseProperty<E> enclosing(); BaseProperty<T> function(String functionName, Class<T> returnType, BaseProperty<?>... arguments); BaseProperty<T> function(String functionName, Class<T> returnType, Object... arguments); BaseProperty<T> operator(String operator, Class<T> returnType, BaseProperty<?>... arguments); BaseProperty<T> operator(String operator, Class<T> returnType, Object... arguments);  }### Answer:
@Test public void testGetFrom() { TstJavaBean bean = new TstJavaBean(); bean.setIntField(7); BaseProperty<Integer> INT_FIELD = new BaseProperty<>("intField", null, Integer.class); assertEquals(Integer.valueOf(7), INT_FIELD.getFrom(bean)); }
@Test public void testGetFromNestedProperty() { TstJavaBean bean = new TstJavaBean(); TstJavaBean nestedBean = new TstJavaBean(); nestedBean.setIntField(7); bean.setObjectField(nestedBean); BaseProperty<Integer> OBJECT_FIELD_INT_FIELD = new BaseProperty<>("objectField.intField", null, Integer.class); assertEquals(Integer.valueOf(7), OBJECT_FIELD_INT_FIELD.getFrom(bean)); }
@Test public void testGetFromNestedNull() { TstJavaBean bean = new TstJavaBean(); bean.setObjectField(null); BaseProperty<Integer> OBJECT_FIELD_INT_FIELD = new BaseProperty<>("objectField.intField", null, Integer.class); assertNull(OBJECT_FIELD_INT_FIELD.getFrom(bean)); }