@Test(description = "POST /vApp/{id}/question/action/answer", dependsOnMethods = { "testGetPendingQuestion" })
public void testAnswerQuestion() {
// TODO check that the question has been answered (e.g. asking for getPendingQuestion does not
// include our answered question).
VmPendingQuestion question = vmApi.getPendingQuestion(vmUrn);
List<VmQuestionAnswerChoice> answerChoices = question.getChoices();
VmQuestionAnswerChoice answerChoice = Iterables.getFirst(answerChoices, null);
assertNotNull(answerChoice, "Question " + question + " must have at least once answer-choice");
VmQuestionAnswer answer = VmQuestionAnswer.builder().choiceId(answerChoice.getId())
.questionId(question.getQuestionId()).build();
vmApi.answerQuestion(vmUrn, answer);
}