### Question:
TypeDeclaration { public Optional<ConstructorDeclaration> getConstructorDeclaration( List<TypeDeclaration> parameterTypeDeclarations) { if (typeElement == null) { return Optional.empty(); } return constructorsIn(typeElement.getEnclosedElements()).stream() .filter(c -> c.getModifiers().contains(Modifier.PUBLIC)) .filter(c -> c.getParameters().size() == parameterTypeDeclarations.size()) .filter(c -> isAssignable(parameterTypeDeclarations, c.getParameters())) .map(c -> ctx.getDeclarations().newConstructorDeclaration(c)) .findAny(); } 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 getConstructorDeclaration() { addProcessor( new TestProcessor() { @Override protected void run() { TypeDeclaration typeDeclaration = ctx.getDeclarations().newTypeDeclaration(String.class); Optional<ConstructorDeclaration> constructorDeclaration = typeDeclaration.getConstructorDeclaration(Collections.emptyList()); assertTrue(constructorDeclaration.isPresent()); } }, new TestProcessor() { @Override protected void run() { TypeDeclaration typeDeclaration = ctx.getDeclarations().newTypeDeclaration(String.class); TypeDeclaration arg1 = ctx.getDeclarations().newTypeDeclaration(Object.class); Optional<ConstructorDeclaration> constructorDeclaration = typeDeclaration.getConstructorDeclaration(Collections.singletonList(arg1)); assertFalse(constructorDeclaration.isPresent()); } }); }