@Test
public void testUploadQuestionGroup_UploadFailureDuringPPIProcessing() {

    when(requestContext.getMessageContext()).thenReturn(messageContext);
    doThrow(new SystemException(FETCH_PPI_COUNTRY_XML_FAILED)).when(questionnaireServiceFacade).uploadPPIQuestionGroup("INDIA");
    UploadQuestionGroupForm form = new UploadQuestionGroupForm();
    form.setSelectedCountry("INDIA");
    String result = controller.upload(form, requestContext);
    assertThat(result, is("failure"));
    verify(requestContext).getMessageContext();
    verify(messageContext).addMessage(argThat(new MessageMatcher(FETCH_PPI_COUNTRY_XML_FAILED)));
}