}
*/
String subscriptionId = cp.createSubscription(customerId, 3, "D0NWLLL", 5);
System.out.println("Subscription Id: " + subscriptionId);
SubscriberManagementService subscriberManagement = cp.getSubscriberManagementService();
//EntityList<JsonEntity> subscribers = subscriberManagement.getSubscribersByEmail(email);
//JsonEntity subscriber = subscribers.get(0);
//String subscriberId = String.valueOf(subscriber.getAsLong("Oid"));
String subscriberId = cp.addSubscriber(customerId, cp.getUniqueEmail("mailinator.com"), SubscriberManagementService.Role.CustomerAdministrator);
System.out.println("Subscriber Id: " + subscriberId);
JsonEntity subscriber = cp.getSubscriberById(subscriberId);
System.out.println("Subscriber: " + subscriber.toJsonString(false));
String loginName = subscriber.getAsString("Subscriber/Person/EmailAddress");
System.out.println("Login Name: " + loginName);
String subscriberState = subscriber.getAsString("Subscriber/SubscriberState");
System.out.println("Subscriber State: " + subscriberState);
if (!"ACTIVE".equals(subscriberState)) {
subscriberManagement.activateSubscriber(subscriberId);
System.out.println("Activated subscriber: " + subscriberId);
}
cp.setOneTimePassword(loginName, "one-time-123");
cp.changePassword(loginName, "one-time-123", "password1");
System.out.println("Changed password: " + loginName);
cp.entitleSubscriber(subscriberId, subscriptionId, true);
System.out.println("Entitled subscriber: " + subscriptionId);
subscriber = subscriberManagement.getSubscriberById(subscriberId);
System.out.println(subscriber.toJsonString(false));
System.out.println("Customer provisioning successful");
} catch (Exception e) {