private Instance instance;
public void testCreateInstance() {
Instance newInstance = api().create(
INSTANCE,
InstanceRequest.builder()
.instanceClass("db.t1.micro")
.allocatedStorageGB(5)
.securityGroup(securityGroup.getName())
.name("jclouds")
.engine("mysql")
.masterUsername("master").masterPassword("Password01")
.backupRetentionPeriod(0).build());
instance = newInstance;
Logger.getAnonymousLogger().info("created instance: " + instance);
assertEquals(instance.getId(), INSTANCE);
assertEquals(instance.getName().get(), "jclouds");
checkInstance(newInstance);
assertTrue(instanceAvailable.apply(newInstance), newInstance.toString());
instance = api().get(newInstance.getId());
Logger.getAnonymousLogger().info("instance available: " + instance);
}