Buggy code:
public abstract class DiscoveryTest extends AbstractDiscoveryTest { protected IServiceInfo serviceInfo ; protected IServiceInfo serviceInfo2 ; protected IServiceInfo serviceInfo3 ; protected String containerUnderTest ; protected long waitTimeForProvider = 1000 ; protected Comparator comparator = new ServiceInfoComparator ( ) ; private String protocol = PROTOCOL ; private String scope = SCOPE ; private String namingAuthority = NAMINGAUTHORITY ; protected IContainer container = null ; protected IDiscoveryContainerAdapter discoveryContainer = null ; public DiscoveryTest ( String name ) { } protected IDiscoveryContainerAdapter getAdapter ( Class clazz ) { } protected IServiceID createServiceID ( String serviceType , String serviceName ) throws Exception { } protected void registerService ( IServiceInfo serviceInfo ) throws Exception { } protected void unregisterService ( IServiceInfo serviceInfo ) throws Exception { } protected void setWaitTimeForProvider ( long aWaitTimeForProvider ) { } protected void setComparator ( Comparator comparator ) { } protected void setProtocol ( String protocol ) { } protected void setScope ( String scope ) { } protected void setNamingAuthority ( String namingAuthority ) { } protected String getServiceType ( ) { } 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 ( ) ; final URI uri = createDefaultURI ( ) ; IServiceID serviceID = ( ( IServiceID ) ( IDFactory . getDefault ( ) . createID ( discoveryContainer . getServicesNamespace ( ) , new Object [ ] { getServiceType ( ) , getHost ( ) } ) ) ) ; assertNotNull ( serviceID ) ; final ServiceProperties serviceProperties = new ServiceProperties ( props ) ; serviceProperties . setPropertyString ( ( ( DiscoveryTest . class . getName ( ) ) + "servicePropertiesString" ) , "serviceProperties" ) ; serviceProperties . setProperty ( ( ( DiscoveryTest . class . getName ( ) ) + "servicePropertiesIntegerMax" ) , new Integer ( Integer . MIN_VALUE ) ) ; serviceProperties . setProperty ( ( ( DiscoveryTest . class . getName ( ) ) + "servicePropertiesIntegerMin" ) , new Integer ( Integer . MAX_VALUE ) ) ; serviceProperties . setProperty ( ( ( DiscoveryTest . class . getName ( ) ) + "servicePropertiesBoolean" ) , new Boolean ( false ) ) ; serviceProperties . setPropertyBytes ( ( ( DiscoveryTest . class . getName ( ) ) + "servicePropertiesByte" ) , new byte [ ] { 'a' , 'b' , 'c' , 'd' } ) ; <START_BUG> serviceInfo = new org . eclipse . ecf . discovery . ServiceInfo ( uri , serviceID , 0 , 0 , serviceProperties ) ; <END_BUG> assertNotNull ( serviceInfo ) ; IServiceID serviceID2 = ( ( IServiceID ) ( IDFactory . getDefault ( ) . createID ( discoveryContainer . getServicesNamespace ( ) , new Object [ ] { "_service._ecf._tests2._fooProtocol.fooScope._fooNA" , getHost ( ) } ) ) ) ; 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 ) ; IServiceID serviceID3 = ( ( IServiceID ) ( IDFactory . getDefault ( ) . createID ( discoveryContainer . getServicesNamespace ( ) , new Object [ ] { "_service._ecf._tests3._barProtocol.barScope._barNA" , getHost ( ) } ) ) ) ; 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 ( ) { } }

Fix:
serviceInfo = new org . eclipse . ecf . discovery . ServiceInfo ( uri , serviceID , 1 , 1 , serviceProperties ) ;