@Test
public void getAssignExpression() {

    BlockStmt body = new BlockStmt();
    Optional<AssignExpr> retrieved = CommonCodegenUtils.getAssignExpression(body, "NOMATCH");
    assertNotNull(retrieved);
    assertFalse(retrieved.isPresent());
    AssignExpr assignExpr = new AssignExpr();
    assignExpr.setTarget(new NameExpr("MATCH"));
    body.addStatement(assignExpr);
    retrieved = CommonCodegenUtils.getAssignExpression(body, "NOMATCH");
    assertNotNull(retrieved);
    assertFalse(retrieved.isPresent());
    retrieved = CommonCodegenUtils.getAssignExpression(body, "MATCH");
    assertNotNull(retrieved);
    assertTrue(retrieved.isPresent());
    AssignExpr retrievedAssignExpr = retrieved.get();
    assertEquals(assignExpr, retrievedAssignExpr);
}