public void testCode() {
		int count = 0;
		boolean success;
		do {
			count++;
			success = TaskManager.DoTask(new SimpleAbstractTask("MESSAGE TASK") {

				/**
				 * 
				 */
				private static final long serialVersionUID = -354957472036892394L;

				@Override
				public synchronized void executeTask() {

					for (int i = 0; i < 1; i++) {
						try {

							// Thread.sleep(5000);

							System.out.println("BEGIN EXECUTION");
							
							String mMessage = "";
							
							
							mMessage = SynchedInOut.getInstance().postMessageForUserInput("Message " + i + ": ");

							Socket sock = new Socket(InetAddress.getLocalHost().getHostName(), 1337);
							
							System.out.println("NEXT STEP");
							
							System.out.println("Message " + i + ": ");

							Client client = new Client();
							
							client.setCurrentIP(sock.getInetAddress().getHostAddress());
							client.setPort(sock.getLocalPort());

							client.addStringMessage(mMessage);

							PrintWriter out = new PrintWriter(sock
									.getOutputStream(), true);
							BufferedReader in = new BufferedReader(
									new InputStreamReader(sock.getInputStream()));

							out.println(mMessage + " : " + i);

							String fromServer = "null";
							while ((fromServer = in.readLine()) != null) {
								switch (Integer.valueOf(fromServer)) {
								case 200: {
									System.out.println("I registered!");
									break;
								}
								case 401: {
									System.out
											.println("Authentication exception");
									break;
								}
								default: {
									System.out.println("Unknown Exception");
									break;
								}
								}
							}

							out.flush();

							in.close();
							out.close();
							sock.close();

							// Thread.sleep(3000);

						} catch (UnknownHostException e) {
							// TODO Auto-generated catch block
							e.printStackTrace();
						} catch (IOException e) {
							// TODO Auto-generated catch block
							e.printStackTrace();
						}
					}

				}

				@Override
				public void onProgressUpdate() {
					// TODO Auto-generated method stub

				}

				@Override
				public void onFinished() {
					// TODO Auto-generated method stub
					System.out.println(this.getClass().getSimpleName() + " finished");
				}

				@Override
				public byte[] toBytes() {
					// TODO Auto-generated method stub
					return null;
				}

				@Override
				public Task fromBytes(byte[] byteArray) {
					// TODO Auto-generated method stub
					return null;
				}

			});

		} while (count < 1);
	}