code: public void submitAnswer(JSONObject answer, String realm) {
          if (answers == null) {
              answers = new JSONObject();
          }
  
          try {
              answers.put(realm, answer);
              if (isAnswersFilled()) {
                  resendRequest();
              }
          } catch (Throwable t) {
              logger.error("submitAnswer failed with exception: " + t.getLocalizedMessage(), t);
          }
      }
docs: Adds an expected challenge answer to collection of answers.
  
  @param answer Answer to add.
  @param realm  Authentication realm for the answer.