@Test
public void jndiLookupWithFilter() throws NamingException
{

  BundleMock mock = new BundleMock("scooby.doo", new Properties());
  
  Thread.currentThread().setContextClassLoader(mock.getClassLoader());
  InitialContext ctx = new InitialContext();
  
  Object s = ctx.lookup("osgi:service/java.lang.Runnable/(rubbish=smelly)");
  
  assertNotNull("We didn't get a service back from our lookup :(", s);
  
  service.run();
  
  Skeleton.getSkeleton(service).assertCalledExactNumberOfTimes(new MethodCall(Runnable.class, "run"), 1);
  Skeleton.getSkeleton(mock.getBundleContext()).assertCalled(new MethodCall(BundleContext.class, "getServiceReferences", "java.lang.Runnable", "(rubbish=smelly)"));
}