### Question:
TypeDeclaration { public Optional<FieldDeclaration> getStaticFieldDeclaration(String name) { return getFieldDeclarationInternal(name, true); } protected  TypeDeclaration(
      Context ctx,
      TypeMirror type,
      CtType ctType,
      TypeElement typeElement,
      Map<Name, List<TypeParameterDeclaration>> typeParameterDeclarationsMap); TypeMirror getType(); String getBinaryName(); boolean isUnknownType(); boolean isNullType(); boolean isBooleanType(); boolean isTextType(); boolean isNumberType(); boolean is(Class<?> clazz); boolean isScalarType(); boolean isScalarIterableType(); boolean isScalarArrayType(); List<TypeParameterDeclaration> getTypeParameterDeclarations(); Optional<ConstructorDeclaration> getConstructorDeclaration(
      List<TypeDeclaration> parameterTypeDeclarations); Optional<FieldDeclaration> getFieldDeclaration(String name); Optional<FieldDeclaration> getStaticFieldDeclaration(String name); Optional<MethodDeclaration> getMethodDeclaration(
      String name, List<TypeDeclaration> parameterTypeDeclarations); Optional<MethodDeclaration> getStaticMethodDeclaration(
      String name, List<TypeDeclaration> parameterTypeDeclarations); TypeDeclaration emulateConcatOperation(TypeDeclaration other); TypeDeclaration emulateArithmeticOperation(TypeDeclaration other); boolean isSameType(TypeDeclaration other); @Override String toString();  }### Answer:
@Test void getStaticFieldDeclaration() { Class<?> testClass = getClass(); addProcessor( new TestProcessor() { @Override protected void run() { TypeDeclaration typeDeclaration = ctx.getDeclarations().newTypeDeclaration(testClass); Optional<FieldDeclaration> fieldDeclaration = typeDeclaration.getStaticFieldDeclaration("myStaticField"); assertTrue(fieldDeclaration.isPresent()); FieldDeclaration f = fieldDeclaration.get(); assertEquals("myStaticField", f.getElement().getSimpleName().toString()); assertEquals("java.lang.String", f.getTypeDeclaration().getBinaryName()); } }, new TestProcessor() { @Override protected void run() { TypeDeclaration typeDeclaration = ctx.getDeclarations().newTypeDeclaration(testClass); Optional<FieldDeclaration> fieldDeclaration = typeDeclaration.getStaticFieldDeclaration("noSuchField"); assertFalse(fieldDeclaration.isPresent()); } }); }