RequestSpotInstancesOptions extends BaseEC2RequestOptions { public RequestSpotInstancesOptions validUntil(Date end) { formParameters.put("ValidUntil", service.iso8601SecondsDateFormat(checkNotNull(end, "end"))); 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 testTo() { RequestSpotInstancesOptions options = new RequestSpotInstancesOptions(); options.validUntil(test); assertEquals(options.buildFormParameters().get("ValidUntil"), ImmutableList.of("1970-05-23T21:21:18Z")); }
@Test public void testToStatic() { RequestSpotInstancesOptions options = validUntil(test); assertEquals(options.buildFormParameters().get("ValidUntil"), ImmutableList.of("1970-05-23T21:21:18Z")); }
@Test(expectedExceptions = NullPointerException.class) public void testToNPE() { validUntil(null); }