}
public void testVAppSuccess() {
InputStream is = getClass().getResourceAsStream("/task-vapp.xml");
Task result = factory.create(injector.getInstance(TaskHandler.class)).parse(is);
Task expects = Task
.builder()
.id("21-1002")
.endTime(dateService.iso8601DateParse("2010-05-26T08:09:09.000+08:00"))
.startTime(dateService.iso8601DateParse("2010-05-26T08:08:08.000+08:00"))
.status(Task.Status.SUCCESS)
.type("application/vnd.vmware.vcloud.task+xml")
.href(URI.create("https://api.savvis.net/rest/api/v0.8/task/21-1002"))
.owner(
ResourceImpl
.builder()
.id("2736")
.name("mockVpdc8")
.type("application/vnd.vmware.vcloud.vdc+xml")
.href(URI
.create("https://api.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736"))
.build())
.result(
ResourceImpl
.builder()
.id("1002")
.name("mock_vpdc_item_007")
.type("application/vnd.vmware.vcloud.vApp+xml")
.href(URI
.create("https://api.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1002"))
.build()).build();
assertEquals(result.toString(), expects.toString());
}