RequestSpotInstancesOptions extends BaseEC2RequestOptions { public RequestSpotInstancesOptions type(SpotInstanceRequest.Type type) { formParameters.put("Type", checkNotNull(type, "type").toString()); return this; }  RequestSpotInstancesOptions validFrom(Date start); RequestSpotInstancesOptions validUntil(Date end); RequestSpotInstancesOptions type(SpotInstanceRequest.Type type); RequestSpotInstancesOptions launchGroup(String launchGroup); RequestSpotInstancesOptions availabilityZoneGroup(String availabilityZoneGroup); static final RequestSpotInstancesOptions NONE; }
@Test public void testInstanceType() { RequestSpotInstancesOptions options = new RequestSpotInstancesOptions(); options.type(SpotInstanceRequest.Type.PERSISTENT); assertEquals(options.buildFormParameters().get("Type"), ImmutableList.of("persistent")); }
@Test public void testInstanceTypeStatic() { RequestSpotInstancesOptions options = type(SpotInstanceRequest.Type.PERSISTENT); assertEquals(options.buildFormParameters().get("Type"), ImmutableList.of("persistent")); }
@Test(expectedExceptions = NullPointerException.class) public void testInstanceTypeNPE() { type(null); }