@Test
public void testAddFieldElements() {

	DDMFormInstanceRecordXMLWriter ddmFormInstanceRecordXMLWriter = mock(
		DDMFormInstanceRecordXMLWriter.class);
	Element element = mock(Element.class);
	Map<String, String> ddmFormFieldsLabel = LinkedHashMapBuilder.put(
		"field1", "Field 1"
	).put(
		"field2", "Field 2"
	).build();
	Map<String, String> ddmFormFieldsValue = LinkedHashMapBuilder.put(
		"field1", "Value 1"
	).put(
		"field2", "Value 2"
	).build();
	Mockito.doCallRealMethod(
	).when(
		ddmFormInstanceRecordXMLWriter
	).addFieldElements(
		element, ddmFormFieldsLabel, ddmFormFieldsValue
	);
	Mockito.doNothing(
	).when(
		ddmFormInstanceRecordXMLWriter
	).addFieldElement(
		Matchers.any(Element.class), Matchers.anyString(),
		Matchers.anyString()
	);
	ddmFormInstanceRecordXMLWriter.addFieldElements(
		element, ddmFormFieldsLabel, ddmFormFieldsValue);
	InOrder inOrder = Mockito.inOrder(ddmFormInstanceRecordXMLWriter);
	inOrder.verify(
		ddmFormInstanceRecordXMLWriter, Mockito.times(1)
	).addFieldElement(
		element, "Field 1", "Value 1"
	);
	inOrder.verify(
		ddmFormInstanceRecordXMLWriter, Mockito.times(1)
	).addFieldElement(
		element, "Field 2", "Value 2"
	);
}