@Test
public void testAddMetadata_7args_1_noauthority() throws SQLException
{

    //by default has no authority
    String schema = "dc";
    String element = "contributor";
    String qualifier = "author";
    String lang = Item.ANY;
    List<String> values = Arrays.asList("value0","value1");
    List<String> authorities = Arrays.asList("auth0","auth2");
    List<Integer> confidences = Arrays.asList(0,0);
    itemService.addMetadata(context, it, schema, element, qualifier, lang, values, authorities, confidences);
    List<MetadataValue> dc = itemService.getMetadata(it, schema, element, qualifier, lang);
    assertThat("testAddMetadata_7args_1 0",dc,notNullValue());
    assertTrue("testAddMetadata_7args_1 1",dc.size() == 2);
    assertThat("testAddMetadata_7args_1 2",dc.get(0).getMetadataField().getMetadataSchema().getName(),equalTo(schema));
    assertThat("testAddMetadata_7args_1 3",dc.get(0).getMetadataField().getElement(),equalTo(element));
    assertThat("testAddMetadata_7args_1 4",dc.get(0).getMetadataField().getQualifier(),equalTo(qualifier));
    assertThat("testAddMetadata_7args_1 5",dc.get(0).getLanguage(),equalTo(lang));
    assertThat("testAddMetadata_7args_1 6",dc.get(0).getValue(),equalTo(values.get(0)));
    assertThat("testAddMetadata_7args_1 7",dc.get(0).getAuthority(),nullValue());
    assertThat("testAddMetadata_7args_1 8",dc.get(0).getConfidence(),equalTo(-1));
    assertThat("testAddMetadata_7args_1 9",dc.get(1).getMetadataField().getMetadataSchema().getName(),equalTo(schema));
    assertThat("testAddMetadata_7args_1 10",dc.get(1).getMetadataField().getElement(),equalTo(element));
    assertThat("testAddMetadata_7args_1 11",dc.get(1).getMetadataField().getQualifier(),equalTo(qualifier));
    assertThat("testAddMetadata_7args_1 12",dc.get(1).getLanguage(),equalTo(lang));
    assertThat("testAddMetadata_7args_1 13",dc.get(1).getValue(),equalTo(values.get(1)));
    assertThat("testAddMetadata_7args_1 14",dc.get(1).getAuthority(),nullValue());
    assertThat("testAddMetadata_7args_1 15",dc.get(1).getConfidence(),equalTo(-1));
}