verify(schemaFactory, serviceSchema, componentSchema);
}
@Test
public void testFinalizeResult() throws Exception {
SchemaFactory schemaFactory = createNiceMock(SchemaFactory.class);
Schema clusterSchema = createNiceMock(Schema.class);
Schema hostSchema = createNiceMock(Schema.class);
Schema hostComponentSchema = createNiceMock(Schema.class);
// mock expectations
expect(schemaFactory.getSchema(Resource.Type.Cluster)).andReturn(clusterSchema).anyTimes();
expect(schemaFactory.getSchema(Resource.Type.Host)).andReturn(hostSchema).anyTimes();
expect(schemaFactory.getSchema(Resource.Type.HostComponent)).andReturn(hostComponentSchema).anyTimes();
expect(clusterSchema.getKeyPropertyId(Resource.Type.Cluster)).andReturn("Clusters/cluster_name").anyTimes();
expect(hostSchema.getKeyPropertyId(Resource.Type.Cluster)).andReturn("Hosts/cluster_name").anyTimes();
expect(hostSchema.getKeyPropertyId(Resource.Type.Host)).andReturn("Hosts/host_name").anyTimes();