/** Checking a problem that was reported by email */
  @Test
  public void testMultipleValuesInObx5() throws HL7Exception, IOException {

    ORU_R01 msg = new ORU_R01();
    msg.initQuickstart("ORU", "R01", "T");

    String input =
        "OBX|10|FT|2239^Opm."
            + "fundus^L^OPFU^FUFOFA||TEKST\\\\E\\\\.br\\\\E\\\\Unclear; niet te"
            + "beoordelen.&line 2&line 3|\\\"\\\"|\\\"\\\"|\\\"\\\"|||F";
    OBX obx = msg.getPATIENT_RESULT().getORDER_OBSERVATION().getOBSERVATION().getOBX();
    obx.parse(input);

    String encoded = obx.encode();
    ourLog.debug("Encoded: \n{}", encoded);
  }
  /**
   * This is from a reported message that was kind of malformed to begin with, but became more
   * malformed in processing.
   *
   * <p>Parse method should clear all existing data including extra components.
   */
  @Test
  public void testVariesParseMethodClearsExistingExtraComponents() throws HL7Exception {

    // Message is stripped down
    String msgString =
        "MSH|^~\\&\r" // -
            + "OBR|\r" // -
            + "OBX||FN|||OF1C1^OF2C1&OF2C2\r";

    ORU_R01 msg = new ORU_R01();
    msg.parse(msgString);

    OBX obx = msg.getPATIENT_RESULT().getORDER_OBSERVATION().getOBSERVATION().getOBX();
    Varies varies = obx.getObx5_ObservationValue(0);
    varies.parse("NF1^NF2");

    String encode = msg.encode();
    ourLog.debug("\n\n" + encode);

    assertEquals("NF1^NF2", varies.encode());
  }