MetadataSchema implements ReloadableEntity<Integer> { public Integer getID() { return id; } protected  MetadataSchema(); @Override boolean equals(Object obj); @Override int hashCode(); String getNamespace(); void setNamespace(String namespace); String getName(); void setName(String name); Integer getID(); static final String DC_SCHEMA; }
@Test public void testGetSchemaID() throws SQLException { assertThat("testGetSchemaID 0",ms.getID(), equalTo(metadataSchemaService.find(context, MetadataSchema.DC_SCHEMA).getID())); }
@Test public void testUpdateAuth() throws Exception { new NonStrictExpectations(authorizeService.getClass()) {{ authorizeService.isAdmin(context); result = true; }}; String namespace = "namespace2"; String name = "name2"; MetadataSchema metadataSchema = metadataSchemaService.create(context, name, namespace); metadataSchemaService.update(context, metadataSchema); MetadataSchema found = metadataSchemaService.findByNamespace(context, namespace); assertThat("testUpdateAuth 0",found.getID(), equalTo(metadataSchema.getID())); }