@Test
public void testDoStart() throws Exception {

    IMocksControl c = createNiceControl();
    BundleContext context = c.createMock(BundleContext.class);
    expect(context.getProperty(Constants.FRAMEWORK_UUID)).andReturn("myid");
    context.addServiceListener(isA(TopologyManagerExport.class));
    expectLastCall();
    ServiceReference<?> sref = c.createMock(ServiceReference.class);
    Bundle bundle = c.createMock(Bundle.class);
    expect(sref.getBundle()).andReturn(bundle).anyTimes();
    expect(context.getServiceReferences((String)null, Activator.DOSGI_SERVICES))
        .andReturn(new ServiceReference[]{sref});
    c.replay();
    Activator activator = new Activator();
    activator.doStart(context, new DefaultExportPolicy());
    c.verify();
    c.reset();
    c.replay();
    activator.doStop(context);
    c.verify();
}