SchemaImpl implements Schema { @Override public String getKeyPropertyId(Resource.Type type) { return resourceProvider.getKeyPropertyIds().get(type); } SchemaImpl(ResourceProvider resourceProvider); @Override String getKeyPropertyId(Resource.Type type); @Override Set<Resource.Type> getKeyTypes();  }
@Test public void testGetKeyPropertyId() { Schema schema = new SchemaImpl(resourceProvider); Assert.assertEquals(PropertyHelper.getPropertyId("c1", "p1"), schema.getKeyPropertyId(Resource.Type.Cluster)); Assert.assertEquals(PropertyHelper.getPropertyId("c1", "p2"), schema.getKeyPropertyId(Resource.Type.Host)); Assert.assertEquals(PropertyHelper.getPropertyId("c1", "p3"), schema.getKeyPropertyId(Resource.Type.Component)); }