@Test
  public void testSetOneTimePasswordBadRequest() {
    try {
      String subscriberId = addSubscriber();
      JsonEntity subscriber = getSubscriberById(subscriberId);
      String loginName = subscriber.getAsString("Subscriber/Person/EmailAddress");
      System.out.println(loginName);

      UserCredentialJsonBuilder userCredential = new UserCredentialJsonBuilder();
      userCredential.setStrict(false);
      userCredential.setLoginName("").setNewPassword("new_password");
      System.out.println(userCredential.toJson());

      AuthenticationService authenticationService = getAuthenticationService();
      authenticationService.setOneTimePassword(userCredential);

      Assert.fail("Expected bad request response");

    } catch (BssException be) {
      // expecting this exception
      JsonJavaObject jsonObject = be.getResponseJson();
      System.err.println(jsonObject);
      Assert.assertNotNull("Expected JSON response", jsonObject);
      Assert.assertEquals("400", be.getResponseCode());
      Assert.assertNotNull(be.getResponseMessage());
      Assert.assertEquals("Error", be.getSeverity());
      Assert.assertNotNull(be.getUserAction());
      Assert.assertNotNull(be.getMessageId());
    } catch (Exception e) {
      e.printStackTrace();
      Assert.fail("Error changing password caused by: " + e.getMessage());
    }
  }
  @Test
  public void testSetOneTimePassword() {
    try {
      String subscriberId = addSubscriber();
      JsonEntity subscriber = getSubscriberById(subscriberId);
      String loginName = subscriber.getAsString("Subscriber/Person/EmailAddress");
      System.out.println(loginName);

      UserCredentialJsonBuilder userCredential = new UserCredentialJsonBuilder();
      userCredential.setLoginName(loginName).setNewPassword("one_time_passw0rd");
      System.out.println(userCredential.toJson());

      AuthenticationService authenticationService = getAuthenticationService();
      authenticationService.setOneTimePassword(userCredential);

    } catch (BssException be) {
      JsonJavaObject jsonObject = be.getResponseJson();
      System.err.println(jsonObject);
      Assert.fail("Error setting one time password because: " + jsonObject);
    } catch (Exception e) {
      e.printStackTrace();
      Assert.fail("Error setting one time password caused by: " + e.getMessage());
    }
  }