package com.helger.pd.client;

import org.junit.Test;

import com.helger.peppol.identifier.participant.SimpleParticipantIdentifier;

/**
 * Test class for class {@link PDClient}.
 *
 * @author Philip Helger
 */
public final class PDClientTest
{
  static
  {
    PDClientConfiguration.getConfigFile ().applyAllNetworkSystemProperties ();
  }

  @Test
  public void testBasic ()
  {
    final SimpleParticipantIdentifier aPI = SimpleParticipantIdentifier.createWithDefaultScheme ("9999:client-test");
    final PDClient aClient = PDClient.createDefaultClient ();
    aClient.deleteServiceGroupFromIndex (aPI);
    aClient.isServiceGroupRegistered (aPI);
    aClient.addServiceGroupToIndex (aPI);
  }
}

@@ -44,24 +44,85 @@
 unit.Test;%0A%0A
+import com.helger.commons.exception.InitializationException;%0A
 import com.h
@@ -615,16 +615,32 @@
 ent ();%0A
+    try%0A    %7B%0A  
     aCli
@@ -670,32 +670,34 @@
 romIndex (aPI);%0A
+  
     aClient.isSe
@@ -724,24 +724,26 @@
  (aPI);%0A    
+  
 aClient.addS
@@ -768,14 +768,106 @@
  (aPI);%0A
+    %7D%0A    catch (final InitializationException ex)%0A    %7B%0A      ex.printStackTrace ();%0A    %7D%0A
   %7D%0A%7D%0A

Test fix if no certificate is present