String name = "Java push name", updatedName = name += " updated";
PushSubscription subscription =
stream != null ? datasift.push().create(s3, stream, name).sync()
: datasift.push().create(s3, query, name).sync();
successful(subscription);
Assert.assertTrue(subscription.status().isActive());
//test update
PushSubscription updatedSubscription = datasift.push().update(subscription.getId(), s3, updatedName).sync();
successful(updatedSubscription);
assertEquals(updatedName, updatedSubscription.name());
return subscription;