HttpResponse createWithDatasetResponse = HttpResponse.builder().statusCode(202).message("HTTP/1.1 202 Accepted")
.payload(payloadFromResourceWithContentType("/new_machine.json", "application/json; charset=UTF-8"))
.build();
JoyentCloudApi apiWithNewMachine = requestsSendResponses(getDatacenters, getDatacentersResponse, createWithDataset, createWithDatasetResponse);
assertEquals(
apiWithNewMachine
.getMachineApiForDatacenter("us-sw-1")
.createWithDataset("sdc:sdc:centos-5.7:1.2.1",
CreateMachineOptions.Builder.name("sample-e92").packageName("Small 1GB")).toString(),
new ParseCreatedMachineTest().expected().toString());
}