List<GoloCompilationException.Problem> problems = expected.getProblems();
assertThat(problems.size(), is(1));
Problem problem = problems.get(0);
assertThat(problem.getType(), is(ASSIGN_CONSTANT));
assertThat(problem.getSource().getIrElement(), instanceOf(AssignmentStatement.class));
AssignmentStatement statement = (AssignmentStatement) problem.getSource().getIrElement();
assertThat(statement.getLocalReference().getName(), is("foo"));
assertThat(statement.getPositionInSourceCode().getLine(), is(7));
assertThat(statement.getPositionInSourceCode().getColumn(), is(3));
throw expected;
}
}