@Test
public void getMethodDeclaration() {

    final String methodName = "METHOD_NAME";
    final ClassOrInterfaceDeclaration classOrInterfaceDeclaration = new ClassOrInterfaceDeclaration();
    assertFalse(CommonCodegenUtils.getMethodDeclaration(classOrInterfaceDeclaration, methodName).isPresent());
    classOrInterfaceDeclaration.addMethod("NOT_METHOD");
    assertFalse(CommonCodegenUtils.getMethodDeclaration(classOrInterfaceDeclaration, methodName).isPresent());
    classOrInterfaceDeclaration.addMethod(methodName);
    assertTrue(CommonCodegenUtils.getMethodDeclaration(classOrInterfaceDeclaration, methodName).isPresent());
}