### Question:
BackendDefinitionAdapter extends AbstractReflectAdapter<T> implements DefinitionAdapter<T>,
                   HasInheritance { @Override public String getBaseType(final Class<?> type) { return Optional.ofNullable(type) .filter(t -> !t.isPrimitive()) .filter(t -> Objects.nonNull(getClassAnnotation(t, Definition.class))) .map(this::findBaseParent) .map(BackendDefinitionAdapter::getDefinitionId) .orElse(null); } @Inject  BackendDefinitionAdapter(); @Override boolean accepts(Class<?> pojo); @Override DefinitionId getId(final T definition); @Override String[] getPropertyFields(final T pojo); @Override String getMetaPropertyField(final T pojo,
                                       final PropertyMetaTypes metaType); @Override String getCategory(final T definition); @Override String getTitle(final T definition); @Override String getDescription(final T definition); @Override @SuppressWarnings("all") String[] getLabels(final T definition); @Override Class<? extends ElementFactory> getGraphFactoryType(final T definition); static Class<? extends ElementFactory> getGraphFactory(final Class<?> type); @Override String getBaseType(final Class<?> type); @Override String[] getTypes(final String baseType);  }### Answer:
@Test public void baseTypeGrandParentTest() { String baseType = tested.getBaseType(FooTestBeanBaseGrandParent.class); assertEquals(baseType, BaseFooTestBean2.class.getName()); }
@Test public void baseTypeParentTest() { String baseType = tested.getBaseType(FooTestBeanBaseParent.class); assertEquals(baseType, BaseFooTestBean2.class.getName()); }
@Test public void baseTypeNoParentTest() { String baseType = tested.getBaseType(FooTestBeanNoParent.class); assertEquals(baseType, null); }
@Test public void baseTypePrimitiveTest() { String baseType = tested.getBaseType(int.class); assertNull(baseType); baseType = tested.getBaseType(double.class); assertNull(baseType); }