@Test
public void testOrderOfFieldsInputDuplicateOrderValueExpectsBothInserted() {

  final MetadataField newFirst = createField("New first", 0, null);
  final DublinCoreMetadataCollection collection = new DublinCoreMetadataCollection(Arrays
    .asList(unorderedOne, unorderedTwo, unorderedThree, first, third, seventh, newFirst));
  assertEquals(7, collection.getFields().size());
  assertTrue("A field with an order value of 0 should be first in the list of fields", first == collection
          .getFields().get(0) || newFirst == collection.getFields().get(0));
  assertTrue("A field with an order value of 0 should be second in the list of fields", first == collection
          .getFields().get(1) || newFirst == collection.getFields().get(1));
  assertEquals("A field with an order value of 2 should be in that position in the list of fields", third, collection
          .getFields().get(2));
  assertEquals("A field with an order value of 7 should be in the last position in the list of fields", seventh,
          collection.getFields().get(6));
}