verify(schemaFactory, serviceSchema, componentSchema);
}
@Test
public void testFinalizeProperties__collection_subResource_propertiesTopLevelOnly() {
SchemaFactory schemaFactory = createNiceMock(SchemaFactory.class);
Schema serviceSchema = createNiceMock(Schema.class);
Schema componentSchema = createNiceMock(Schema.class);
// schema expectations
expect(schemaFactory.getSchema(Resource.Type.Service)).andReturn(serviceSchema).anyTimes();
expect(serviceSchema.getKeyPropertyId(Resource.Type.Service)).andReturn("ServiceInfo/service_name").anyTimes();
expect(serviceSchema.getKeyPropertyId(Resource.Type.Cluster)).andReturn("ServiceInfo/cluster_name").anyTimes();
expect(schemaFactory.getSchema(Resource.Type.Component)).andReturn(componentSchema).anyTimes();
expect(componentSchema.getKeyPropertyId(Resource.Type.Service)).andReturn("ServiceComponentInfo/service_name").anyTimes();
expect(componentSchema.getKeyPropertyId(Resource.Type.Component)).andReturn("ServiceComponentInfo/component_name").anyTimes();
replay(schemaFactory, serviceSchema, componentSchema);