registerCustomer();
String subscriberId = addSubscriber();
SubscriberManagementService subscriberManagement = getSubscriberManagementService();
JsonEntity jsonEntity = subscriberManagement.getSubscriberById(subscriberId);
Assert.assertNotNull("Unable to retrieve subscriber: "+subscriberId, jsonEntity);
Assert.assertEquals(subscriberId, subscriberManagement.getSubscriberId(jsonEntity.getJsonObject()));
JsonJavaObject rootObject = jsonEntity.getJsonObject();
Assert.assertNotNull("Unable to retrieve subscriber: "+subscriberId, rootObject);
subscriberManagement.suspendSubscriber(subscriberId, false);
jsonEntity = subscriberManagement.getSubscriberById(subscriberId);
Assert.assertNotNull("Unable to retrieve subscriber: "+subscriberId, jsonEntity);
Assert.assertEquals(subscriberId, subscriberManagement.getSubscriberId(jsonEntity.getJsonObject()));
rootObject = jsonEntity.getJsonObject();
Assert.assertNotNull("Unable to retrieve subscriber: "+subscriberId, rootObject);
System.out.println(rootObject);
JsonJavaObject subscriberObject = rootObject.getAsObject("Subscriber");
System.out.println(subscriberObject);
Assert.assertEquals("SUSPENDED", subscriberObject.get("SubscriberState"));
subscriberManagement.unsuspendSubscriber(subscriberId);
jsonEntity = subscriberManagement.getSubscriberById(subscriberId);
Assert.assertNotNull("Unable to retrieve subscriber: "+subscriberId, jsonEntity);
Assert.assertEquals(subscriberId, subscriberManagement.getSubscriberId(jsonEntity.getJsonObject()));
rootObject = jsonEntity.getJsonObject();
Assert.assertNotNull("Unable to retrieve subscriber: "+subscriberId, rootObject);
System.out.println(rootObject);
subscriberObject = rootObject.getAsObject("Subscriber");
System.out.println(subscriberObject);