+ "\n "
+ "\n=========================================================" );
final GenericXmlApplicationContext context = Main.setupContext();
final SimpleGateway gateway = context.getBean(SimpleGateway.class);
final AbstractServerConnectionFactory crLfServer = context.getBean(AbstractServerConnectionFactory.class);
System.out.print("Waiting for server to accept connections...");
TestingUtilities.waitListening(crLfServer, 10000L);
System.out.println("running.\n\n");
System.out.println("Please enter some text and press <enter>: ");
System.out.println("\tNote:");
System.out.println("\t- Entering FAIL will create an exception");
System.out.println("\t- Entering q will quit the application");
System.out.print("\n");
System.out.println("\t--> Please also check out the other samples, " +
"that are provided as JUnit tests.");
System.out.println("\t--> You can also connect to the server on port '" + crLfServer.getPort() + "' using Telnet.\n\n");
while (true) {
final String input = scanner.nextLine();