@Test
public void testCreateAuth() throws Exception
{

    new NonStrictExpectations(authorizeService.getClass())
    {{
        // Allow full admin permissions
        authorizeService.isAdmin(context); result = true;
    }};
    String elem = "elem1";
    String qual = "qual1";
    MetadataField m = metadataFieldService.create(context, dcSchema, elem, qual, null);
    MetadataField found = metadataFieldService.findByElement(context, dcSchema, elem, qual);
    assertThat("testCreateAuth 0",found.getID(), equalTo(m.getID()));
}