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();  }
@Test public void testUpdateAuth() throws Exception { when(authorizeServiceSpy.isAdmin(context)).thenReturn(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())); }