private void testLogout()
	{
		//Nodes moeten zichzelf herstellen na logout
		//Beginsituatie = 3 nodes
		tests++;
		try
		{	
			Node prevNode2 = null;
			Node nextNode2 = null;
			Node prevNode3 = null;
			Node nextNode3 = null;
			
			NodeLinkManagerInterface iFace2 = (NodeLinkManagerInterface)c2.getRMIInterface("//localhost/NodeLinkManager_" + c2.getHostname());
			NodeLinkManagerInterface iFace3 = (NodeLinkManagerInterface)c3.getRMIInterface("//localhost/NodeLinkManager_" + c3.getHostname());
			
			//first client		after logging out there should be a circle of 2 clients
			Runnable logout1 = new Runnable()
			{
				@Override
				public void run()
				{
					assert c1.logoutSystem(): "Failed to logout client 1";
				}
			};
			
			new Thread(logout1).start();
			
			printDebugInfo("INFO", "Wait for " + c1.getHostname() +" to finish shutdown.");
			while(c1.getSessionState())
			{
				try
				{
					Thread.sleep(1000);
				}
				catch(InterruptedException e)
				{
					System.err.println("Thread sleep: " + e.getMessage());
				}
				//hold off, wait for the client (stop blocking the client thread with polling)
				System.out.println("Waiting for node: " + c1.getHostname() + " ...");
			}
			
			prevNode2 = iFace2.getPrev();
			nextNode2 = iFace2.getNext();
			
			prevNode3 = iFace3.getPrev();
			nextNode3 = iFace3.getNext();
			
			assert (nextNode2.equals(prevNode2) && nextNode3.equals(prevNode3)): "Failed to restore nodelinks when going from 3->2 clients";
			
			//Second Client
			Runnable logout2 = new Runnable()
			{
				@Override
				public void run()
				{
					assert c2.logoutSystem(): "Failed to logout client 2";
				}
			};
			
			new Thread(logout2).start();
			
			printDebugInfo("INFO", "Wait for " + c2.getHostname() +" to finish shutdown.");
			while(c2.getSessionState())
			{
				try
				{
					Thread.sleep(1000);
				}
				catch(InterruptedException e)
				{
					System.err.println("Thread sleep: " + e.getMessage());
				}
				//hold off, wait for the client (stop blocking the client thread with polling)
				System.out.println("Waiting for node: " + c2.getHostname() + " ...");
			}
			
			prevNode3 = iFace3.getPrev();
			nextNode3 = iFace3.getNext();
			
			assert(prevNode3.equals(nextNode3)): "Failed to restore nodelinks when going from 2->1 clients";
			
			//Derde Client		There should be a loop between nodes
			
			assert c3.logoutSystem(): "Failed to logout client 3";
			//no more connected nodes -> nothing to check
			
			printDebugInfo("Logout ", "Passed");
			passed++;
		}
		catch(AssertionError e)
		{
			printDebugInfo("Shutdown", e.getMessage());
		}
		catch(NullPointerException | RemoteException e) 
		{
			System.err.println("NodeServer exception"+ e.getMessage());
		}
	}