### Question:
ASTUtils { public boolean inherits(ASTType astType, ASTType inheritable) { if (astType == null) { return false; } if(inheritable == null || inheritable.equals(OBJECT_TYPE)){ return true; } if (astType.equals(inheritable)) { return true; } for (ASTType typeInterfaces : astType.getInterfaces()) { if (inherits(typeInterfaces, inheritable)) { return true; } } return inherits(astType.getSuperClass(), inheritable); } private  ASTUtils(); static ASTUtils getInstance(); boolean inherits(ASTType astType, ASTType inheritable); boolean isAnnotated(ASTType annotatationType, ImmutableSet<ASTAnnotation> annotations); ASTAnnotation getAnnotation(ASTType annotationType, ImmutableSet<ASTAnnotation> annotations); ASTAnnotation getAnnotation(Class annotationClass, ImmutableSet<ASTAnnotation> annotations); ASTAnnotation getAnnotation(String annotationClassName, ImmutableSet<ASTAnnotation> annotations); boolean isAnnotated(ASTType type, Class annotationClass); boolean isAnnotated(ASTType type, String annotationClassName); ASTConstructor findConstructor(ASTType type, ASTType... parameters); boolean constructorExists(ASTType type, final ASTType... parameters); ASTMethod findMethod(ASTType containingType, String methodName, ASTType... methodParameters); boolean methodExists(ASTType containingType, String methodName, ASTType... methodParameters); ASTField findField(ASTType containingType, final String fieldName); boolean fieldExists(ASTType containingType, final String fieldName); boolean parameterTypesMatch(List<ASTParameter> parameters, ASTType... types);  }### Answer:
@Test public void testExtends() { assertTrue(astUtils.inherits(a, b)); assertTrue(astUtils.inherits(a, c)); assertFalse(astUtils.inherits(a, h)); assertTrue(astUtils.inherits(a, objectType)); assertFalse(astUtils.inherits(b, a)); assertFalse(astUtils.inherits(c, a)); }
@Test public void testInherits() { assertTrue(astUtils.inherits(a, d)); assertTrue(astUtils.inherits(a, e)); assertTrue(astUtils.inherits(a, f)); assertTrue(astUtils.inherits(a, g)); assertTrue(astUtils.inherits(e, f)); assertTrue(astUtils.inherits(e, g)); assertFalse(astUtils.inherits(e, h)); assertFalse(astUtils.inherits(d, e)); assertFalse(astUtils.inherits(a, i)); }
@Test public void testNull() { assertTrue(astUtils.inherits(a, null)); assertFalse(astUtils.inherits(null, null)); }
@Test public void testSelf() { assertTrue(astUtils.inherits(a, a)); }