@Test
public void getInstance(@Mocked final PriamInstance instance) {

    final String expected = "plain text describing the instance";
    new Expectations() {
        {
            config.getAppName();
            result = APP_NAME;
            factory.getInstance(APP_NAME, instanceInfo.getRegion(), NODE_ID);
            result = instance;
            instance.toString();
            result = expected;
        }
    };
    assertEquals(expected, resource.getInstance(NODE_ID));
}