public final static String getOutputCommand(ReturnObject rObject) {
		StringBuilder builder = new StringBuilder();

		// TODO Should be configurable
		// TODO ADD RETURN MESSAGE TO OTHER OUTPUT COMMAND
		builder.append(RETURN_MESSAGE);

		if (rObject.isError()) {
			builder.append(rObject.getCommandPart());
		} else {
			builder.append(SUCCESS);
			builder.append(rObject.getCommandPart());
		}
		builder.append(END_OUTPUT);

		return builder.toString();
	}
@Test
	public void testGetOutputCommand() {
		ReturnObject rObject1 = ReturnObject.getErrorReturnObject();
		ReturnObject rObject2 = ReturnObject.getPrimitiveReturnObject(2);
		ReturnObject rObject3 = ReturnObject.getPrimitiveReturnObject(2.2);
		ReturnObject rObject4 = ReturnObject.getPrimitiveReturnObject(2.2f);
		ReturnObject rObject5 = ReturnObject.getPrimitiveReturnObject('c');
		ReturnObject rObject6 = ReturnObject.getPrimitiveReturnObject("Hello\nWorld");
		ReturnObject rObject7 = ReturnObject.getPrimitiveReturnObject(5L);
		ReturnObject rObject8 = ReturnObject.getPrimitiveReturnObject(true);
		ReturnObject rObject9 = ReturnObject.getPrimitiveReturnObject(false);
		ReturnObject rObject10 = ReturnObject.getNullReturnObject();
		ReturnObject rObject11 = ReturnObject.getReferenceReturnObject("o123");
		ReturnObject rObject12 = ReturnObject.getListReturnObject("o123", 2);
		ReturnObject rObject13 = ReturnObject.getMapReturnObject("o124", 3);
		ReturnObject rObject14 = ReturnObject.getSetReturnObject("o125", 3);
		ReturnObject rObject15 = ReturnObject.getArrayReturnObject("o126", 3);
		ReturnObject rObject16 = ReturnObject.getIteratorReturnObject("o127");
		ReturnObject rObject17 = ReturnObject.getDecimalReturnObject(new BigDecimal("-14.532"));

		assertEquals("!x\n", Protocol.getOutputCommand(rObject1));
		assertEquals("!yi2\n", Protocol.getOutputCommand(rObject2));
		assertEquals("!yd2.2\n", Protocol.getOutputCommand(rObject3));
		assertEquals("!yd2.2\n", Protocol.getOutputCommand(rObject4));
		assertEquals("!ysc\n", Protocol.getOutputCommand(rObject5));
		assertEquals("!ysHello\\nWorld\n", Protocol.getOutputCommand(rObject6));
		assertEquals("!yL5\n", Protocol.getOutputCommand(rObject7));
		assertEquals("!ybtrue\n", Protocol.getOutputCommand(rObject8));
		assertEquals("!ybfalse\n", Protocol.getOutputCommand(rObject9));
		assertEquals("!yn\n", Protocol.getOutputCommand(rObject10));
		assertEquals("!yro123\n", Protocol.getOutputCommand(rObject11));
		assertEquals("!ylo123\n", Protocol.getOutputCommand(rObject12));
		assertEquals("!yao124\n", Protocol.getOutputCommand(rObject13));
		assertEquals("!yho125\n", Protocol.getOutputCommand(rObject14));
		assertEquals("!yto126\n", Protocol.getOutputCommand(rObject15));
		assertEquals("!ygo127\n", Protocol.getOutputCommand(rObject16));
		assertEquals("!yD-14.532\n", Protocol.getOutputCommand(rObject17));
	}