@Test
public void testGetResources_MissingUserName() throws Exception {

    thrown.expect(SystemException.class);
    thrown.expectMessage("HAWQ User Name property is not specified for the view instance.");
    Map<String, String> props = prepareViewContextProperties();
    props.remove("hawq.user.name");
    expect(viewContext.getProperties()).andReturn(props).anyTimes();
    replayAll();
    provider.getResources(null);
}