@Test
public void testAddingWithNullValues() throws InvalidSyntaxException {

    IMocksControl c = EasyMock.createControl();
    DistributionProvider provider = c.createMock(DistributionProvider.class);
    ServiceReference<DistributionProvider> providerRef = c.createMock(ServiceReference.class);
    expect(providerRef.getProperty(RemoteConstants.REMOTE_INTENTS_SUPPORTED)).andReturn(null);
    expect(providerRef.getProperty(RemoteConstants.REMOTE_CONFIGS_SUPPORTED)).andReturn(null);
    BundleContext context = c.createMock(BundleContext.class);
    String filterSt = String.format("(objectClass=%s)", DistributionProvider.class.getName());
    Filter filter = FrameworkUtil.createFilter(filterSt);
    expect(context.createFilter(filterSt)).andReturn(filter);
    expect(context.getService(providerRef)).andReturn(provider);
    ServiceRegistration rsaReg = c.createMock(ServiceRegistration.class);
    expect(context.registerService(EasyMock.isA(String.class), EasyMock.isA(ServiceFactory.class),
                                            EasyMock.isA(Dictionary.class)))
        .andReturn(rsaReg).atLeastOnce();
    context.addServiceListener(anyObject(ServiceListener.class));
    expectLastCall().anyTimes();
    final BundleContext apiContext = c.createMock(BundleContext.class);
    c.replay();
    DistributionProviderTracker tracker = new DistributionProviderTracker(context) {
        protected BundleContext getAPIContext() {
            return apiContext;
        }
    };
    tracker.addingService(providerRef);
    c.verify();
}