@Test public void testSuspendCustomer() { try { String customerId = registerCustomer(); CustomerManagementService customerManagement = getCustomerManagementService(); JsonEntity jsonEntity = customerManagement.getCustomerById(customerId); Assert.assertNotNull("Unable to retrieve customer: " + customerId, jsonEntity); Assert.assertEquals(customerId, customerManagement.getCustomerId(jsonEntity.getJsonObject())); customerManagement.suspendCustomer(customerId); jsonEntity = customerManagement.getCustomerById(customerId); Assert.assertNotNull("Unable to retrieve customer: " + customerId, jsonEntity); JsonJavaObject rootObject = jsonEntity.getJsonObject(); JsonJavaObject customerObject = rootObject.getAsObject("Customer"); System.out.println(customerObject); Assert.assertNotNull("No SuspensionDate", customerObject.get("SuspensionDate")); customerManagement.unsuspendCustomer(customerId); jsonEntity = customerManagement.getCustomerById(customerId); Assert.assertNotNull("Unable to retrieve customer: " + customerId, jsonEntity); rootObject = jsonEntity.getJsonObject(); customerObject = rootObject.getAsObject("Customer"); System.out.println(customerObject); Assert.assertNull("SuspensionDate", customerObject.get("SuspensionDate")); Assert.assertEquals("ACTIVE", customerObject.get("CustomerState")); } catch (BssException be) { JsonJavaObject jsonObject = be.getResponseJson(); System.out.println(jsonObject); Assert.fail("Error suspending customer caused by: " + jsonObject); } catch (Exception e) { e.printStackTrace(); Assert.fail("Error suspending customer caused by: " + e.getMessage()); } }