public void toEbXML(DocumentsQuery query, EbXMLAdhocQueryRequest ebXML) {

    assertEquals("12.21.41", ebXML.getHome());

    assertEquals(
        Arrays.asList("('code1^^scheme1')", "('code2^^scheme2')"),
        ebXML.getSlotValues(QueryParameter.DOC_ENTRY_CLASS_CODE.getSlotName()));

    assertEquals(
        Arrays.asList("('codet1^^schemet1')", "('codet2^^schemet2')"),
        ebXML.getSlotValues(QueryParameter.DOC_ENTRY_TYPE_CODE.getSlotName()));

    assertEquals(
        Arrays.asList("('code3^^scheme3')", "('code4^^scheme4')"),
        ebXML.getSlotValues(QueryParameter.DOC_ENTRY_PRACTICE_SETTING_CODE.getSlotName()));

    assertEquals(
        Arrays.asList("1980"),
        ebXML.getSlotValues(QueryParameter.DOC_ENTRY_CREATION_TIME_FROM.getSlotName()));
    assertEquals(
        Arrays.asList("1981"),
        ebXML.getSlotValues(QueryParameter.DOC_ENTRY_CREATION_TIME_TO.getSlotName()));

    assertEquals(
        Arrays.asList("1982"),
        ebXML.getSlotValues(QueryParameter.DOC_ENTRY_SERVICE_START_TIME_FROM.getSlotName()));
    assertEquals(
        Arrays.asList("1983"),
        ebXML.getSlotValues(QueryParameter.DOC_ENTRY_SERVICE_START_TIME_TO.getSlotName()));

    assertEquals(
        Arrays.asList("1984"),
        ebXML.getSlotValues(QueryParameter.DOC_ENTRY_SERVICE_STOP_TIME_FROM.getSlotName()));
    assertEquals(
        Arrays.asList("1985"),
        ebXML.getSlotValues(QueryParameter.DOC_ENTRY_SERVICE_STOP_TIME_TO.getSlotName()));

    assertEquals(
        Arrays.asList("('code5^^scheme5')", "('code6^^scheme6')"),
        ebXML.getSlotValues(QueryParameter.DOC_ENTRY_HEALTHCARE_FACILITY_TYPE_CODE.getSlotName()));

    List<EbXMLSlot> slots = ebXML.getSlots(QueryParameter.DOC_ENTRY_EVENT_CODE.getSlotName());
    assertEquals(2, slots.size());
    assertEquals(
        Arrays.asList("('code7^^scheme7')", "('code8^^scheme8')"), slots.get(0).getValueList());
    assertEquals(Arrays.asList("('code9^^scheme9')"), slots.get(1).getValueList());

    slots = ebXML.getSlots(QueryParameter.DOC_ENTRY_CONFIDENTIALITY_CODE.getSlotName());
    assertEquals(2, slots.size());
    assertEquals(
        Arrays.asList("('code10^^scheme10')", "('code11^^scheme11')"), slots.get(0).getValueList());
    assertEquals(Arrays.asList("('code12^^scheme12')"), slots.get(1).getValueList());

    assertEquals(
        Arrays.asList("('per''son1')", "('person2')"),
        ebXML.getSlotValues(QueryParameter.DOC_ENTRY_AUTHOR_PERSON.getSlotName()));

    assertEquals(
        Arrays.asList("('code13^^scheme13')", "('code14^^scheme14')"),
        ebXML.getSlotValues(QueryParameter.DOC_ENTRY_FORMAT_CODE.getSlotName()));

    assertEquals(
        Arrays.asList(
            "('urn:oasis:names:tc:ebxml-regrep:StatusType:Approved')",
            "('urn:oasis:names:tc:ebxml-regrep:StatusType:Submitted')"),
        ebXML.getSlotValues(QueryParameter.DOC_ENTRY_STATUS.getSlotName()));

    assertEquals(
        Arrays.asList("('urn:uuid:7edca82f-054d-47f2-a032-9b2a5b5186c1')"),
        ebXML.getSlotValues(QueryParameter.DOC_ENTRY_TYPE.getSlotName()));

    assertEquals(19, ebXML.getSlots().size());
  }
 @Test
 public void testToEbXMLEmpty_MPQ() {
   multiplePatientsQueryTransformer.toEbXML(new FindDocumentsForMultiplePatientsQuery(), ebXML);
   assertEquals(0, ebXML.getSlots().size());
 }
 @Test
 public void testToEbXMLNull_MPQ() {
   multiplePatientsQueryTransformer.toEbXML(null, ebXML);
   assertEquals(0, ebXML.getSlots().size());
 }
 @Test
 public void testToEbXMLEmpty() {
   transformer.toEbXML(new FindDocumentsQuery(), ebXML);
   assertEquals(0, ebXML.getSlots().size());
 }
 @Test
 public void testToEbXMLNull() {
   transformer.toEbXML(null, ebXML);
   assertEquals(0, ebXML.getSlots().size());
 }