Code example for PipedInputStream

0
		s.close();
	} 
 
	@Test 
	public void testComplete() throws Exception { 
		PipedInputStream pis = new PipedInputStream();
		PipedOutputStream pos = new PipedOutputStream(pis);
		PrintStream ps = new PrintStream(pos);
		ps.println("15-05-1980"); //valid date
		ps.println("a description");
		ps.println("-32,5");
		ps.println("1");//an account from
		ps.println("1");//an account to
		ps.println("1");//a concept
		ps.println();//a concept
		 
		DoubleMovementConsoleCompleter completer = new DoubleMovementConsoleCompleter(System.out, pis);
		DoubleMovement m = completer.complete(new DoubleMovement(), 1);
		 
		Assert.assertNotNull(m.getMovementDate());
		Assert.assertNotNull(m.getDescription());
		Assert.assertNotNull(m.getAmount());