Buggy code:
public abstract class DiscoveryTest extends AbstractDiscoveryTest { protected IServiceInfo serviceInfo ; protected IServiceID serviceID ; protected IServiceInfo serviceInfo2 ; protected IServiceID serviceID2 ; protected IServiceInfo serviceInfo3 ; protected IServiceID serviceID3 ; public DiscoveryTest ( String name , long aDiscoveryContainerInterval , Comparator aComparator ) { } public DiscoveryTest ( String name , long aDiscoveryContainerInterval ) { } protected void setUp ( ) throws Exception { super . setUp ( ) ; assertNotNull ( containerUnderTest ) ; assertTrue ( containerUnderTest . startsWith ( "ecf.discovery." ) ) ; container = ContainerFactory . getDefault ( ) . createContainer ( containerUnderTest ) ; discoveryContainer = getAdapter ( IDiscoveryContainerAdapter . class ) ; assertNotNull ( container ) ; assertNotNull ( discoveryContainer ) ; final Properties props = new Properties ( ) ; <START_BUG> final URI uri = new URI ( ITestConstants . URI ) ; <END_BUG> serviceID = ( ( IServiceID ) ( IDFactory . getDefault ( ) . createID ( discoveryContainer . getServicesNamespace ( ) , new Object [ ] { ITestConstants . SERVICE_TYPE , ITestConstants . HOST } ) ) ) ; assertNotNull ( serviceID ) ; final ServiceProperties serviceProperties = new ServiceProperties ( props ) ; serviceProperties . setPropertyString ( "serviceProperties" , "serviceProperties" ) ; serviceInfo = new org . eclipse . ecf . discovery . ServiceInfo ( uri , serviceID , 0 , 0 , serviceProperties ) ; assertNotNull ( serviceInfo ) ; serviceID2 = ( ( IServiceID ) ( IDFactory . getDefault ( ) . createID ( discoveryContainer . getServicesNamespace ( ) , new Object [ ] { ITestConstants . SERVICE_TYPE2 , ITestConstants . HOST } ) ) ) ; assertNotNull ( serviceID ) ; final ServiceProperties serviceProperties2 = new ServiceProperties ( props ) ; serviceProperties2 . setPropertyString ( "serviceProperties2" , "serviceProperties2" ) ; serviceInfo2 = new org . eclipse . ecf . discovery . ServiceInfo ( uri , serviceID2 , 2 , 2 , serviceProperties2 ) ; assertNotNull ( serviceInfo2 ) ; serviceID3 = ( ( IServiceID ) ( IDFactory . getDefault ( ) . createID ( discoveryContainer . getServicesNamespace ( ) , new Object [ ] { ITestConstants . SERVICE_TYPE3 , ITestConstants . HOST } ) ) ) ; assertNotNull ( serviceID ) ; final ServiceProperties serviceProperties3 = new ServiceProperties ( props ) ; serviceProperties3 . setPropertyString ( "serviceProperties3" , "serviceProperties3" ) ; serviceInfo3 = new org . eclipse . ecf . discovery . ServiceInfo ( uri , serviceID3 , 3 , 3 , serviceProperties3 ) ; assertNotNull ( serviceInfo3 ) ; } protected void tearDown ( ) throws Exception { } protected void registerService ( ) { } protected void unregisterService ( ) { } public void testConnect ( ) { } public void testConnectTwoTimes ( ) { } public void testDisconnect ( ) { } public void testReconnect ( ) { } public void testGetServiceInfo ( ) { } public void testGetServiceInfoWithNull ( ) { } public void testGetServiceTypes ( ) { } public void testGetServices ( ) { } public void testGetServicesIServiceTypeID ( ) { } public void testGetServicesIServiceTypeIDWithNull ( ) { } public void testRegisterService ( ) { } public void testRegisterServiceWithNull ( ) { } public void testUnregisterService ( ) { } public void testUnregisterServiceWithNull ( ) { } public void testDispose ( ) { } protected void addServiceListener ( TestListener serviceListener ) { } public void testAddServiceListenerIServiceListener ( ) { } public void testAddServiceListenerIServiceListenerWithNull ( ) { } public void testAddServiceListenerIServiceTypeIDIServiceListener ( ) { } private void addListenerRegisterAndWait ( TestListener testServiceListener , IServiceInfo aServiceInfo ) { } public void testAddServiceListenerIServiceTypeIDIServiceListenerWithNull ( ) { } public void testAddServiceTypeListener ( ) { } protected IServiceTypeListener createServiceTypeListener ( ) { } public void testAddServiceTypeListenerWithNull ( ) { } public void testGetConnectNamespace ( ) { } public void testGetID ( ) { } public void testGetServicesNamespace ( ) { } public void testRemoveServiceListenerIServiceListener ( ) { } public void testRemoveServiceListenerIServiceListenerWithNull ( ) { } public void testRemoveServiceListenerIServiceTypeIDIServiceListener ( ) { } public void testRemoveServiceListenerIServiceTypeIDIServiceListenerWithNull ( ) { } public void testRemoveServiceTypeListener ( ) { } public void testRemoveServiceTypeListenerWithNull ( ) { } public void testMethodsWhichMustFailWhenUnconnected ( ) { } }

Fix:
final URI uri = createDefaultURI ( ) ;