InstanceAWSProvider implements InstanceProvider { public ResourceException error(String message) { return error(ResourceException.FORBIDDEN, message); }  @Override Scheme getProviderScheme(); @Override void initialize(String provider, String providerEndpoint, SSLContext sslContext,
            KeyStore keyStore); ResourceException error(String message); ResourceException error(int errorCode, String message); @Override InstanceConfirmation confirmInstance(InstanceConfirmation confirmation); @Override InstanceConfirmation refreshInstance(InstanceConfirmation confirmation);  }
@Test public void testError() { InstanceAWSProvider provider = new InstanceAWSProvider(); ResourceException exc = provider.error("unable to access"); assertEquals(exc.getCode(), 403); assertEquals(exc.getMessage(), "ResourceException (403): unable to access"); }