@Test
public void testGetComponentMetadata() throws Exception {

    final long serviceId = 7117;
    final String componentId = ".component-1";
    final String [] cidarray = new String[]{componentId};
    final List emptyList = new ArrayList();
    
    mockery.checking(new Expectations(){
        {
            oneOf(mockContext).getServiceReferences(with(any(String.class)), with(any(String.class)));
            will(returnValue(mockServiceReferences));
            oneOf(mockContext).getService(mockServiceReferences[0]);
            will(returnValue(mockContainer));
        }
    });
    mockery.checking(new Expectations(){
        {
            oneOf(mockContainer).getComponentMetadata(componentId);
            will(returnValue(mockBeanMetadata));
        }
    });
    mockery.checking(new Expectations(){
        {
            allowing(mockBeanMetadata).getDependsOn();
            will(returnValue(emptyList));
            allowing(mockBeanMetadata).getArguments();
            will(returnValue(emptyList));
            allowing(mockBeanMetadata).getFactoryComponent();
            will(returnValue(null));
            allowing(mockBeanMetadata).getProperties();
            will(returnValue(emptyList));
            ignoring(mockBeanMetadata);
        }
    });
    metadata.getComponentMetadata(serviceId, componentId);
    mockery.assertIsSatisfied();
}