@Test
  public void testLifeCycle() {
    // Get the first image, we dont really care what it is in this test.
    NewServerResponse serverResponse =
        connection.createServer("test.ivan.api.com", "lenny", "MIRO4B");
    Server server = serverResponse.getServer();
    // Now we have the server, lets restart it
    assertNotNull(server.getId());
    ServerInfo serverInfo = connection.restartServer(server.getId());

    // Should be running now.
    assertEquals(serverInfo.getState(), RunningState.RUNNING);
    assertEquals(server.getName(), "test.ivan.api.com");
    assertEquals(server.getImageId(), "lenny");
    connection.destroyServer(server.getId());
  }
 @Test
 public void testImages() {
   Set<? extends Image> images = connection.getImageList();
   for (Image image : images) {
     if (image.getId().equalsIgnoreCase("lenny")) {
       assertTrue(true);
       return;
     }
   }
   assertTrue(false, "lenny not found");
 }
 @Test
 public void testPricingPlans() {
   Set<? extends PricingPlan> plans = connection.getPricingPlanList();
   for (PricingPlan plan : plans) {
     if (plan.getId().equalsIgnoreCase("MIRO4B")) {
       assertTrue(true);
       return;
     }
   }
   assertTrue(false);
 }