@Test
public void testParse() {

    //GIVEN
    dialogDescriptorOne = new DialogDescriptor(null, null, null);
    dialogDescriptorTwo = new DialogDescriptor(null, null, null);
    List<DialogDescriptor> expected = new ArrayList<>();
    expected.add(dialogDescriptorOne);
    nameToDialogDescriptor.put("one", dialogDescriptorOne);
    nameToDialogDescriptor.put("two", dialogDescriptorTwo);
    given(sequenceElement.getElementsByTagName(DIALOG_DESCRIPTOR_REFERENCE_TAG_NAME)).willReturn(nodeList);
    given(nodeList.getLength()).willReturn(1);
    given(nodeList.item(0)).willReturn(dialogDescriptorReferenceElement);
    given(dialogDescriptorReferenceElement.getAttribute(DIALOG_DESCRIPTOR_REFERENCE_NAME_ATTRIBUTE)).willReturn("one");
    //WHEN
    List<DialogDescriptor> result = underTest.parse(sequenceElement, nameToDialogDescriptor);
    //THEN
    assertEquals(expected, result);
}