@@ -0,0 +1,1620 @@
+package ru.matevosyan.start;%0A%0Aimport org.junit.Test;%0A%0Aimport java.io.ByteArrayInputStream;%0Aimport java.io.ByteArrayOutputStream;%0Aimport java.io.PrintStream;%0A%0Aimport static com.sun.org.apache.xerces.internal.util.PropertyState.is;%0Aimport static junit.framework.TestCase.assertEquals;%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0Aimport static org.junit.Assert.assertNotEquals;%0Aimport static org.junit.Assert.assertTrue;%0A%0A/**%0A * Class ConsoleInputTest created for testing.%0A * Created on 18.12.2016.%0A * @since 1.0%0A * @version 1.0%0A * @author Matevosyan Vardan%0A */%0A%0Apublic class ConsoleInputTest %7B%0A%0A    @Test%0A    public void whenAskForReturnThanReturnScanIn() %7B%0A%0A        String testText = %22Hello%22;%0A        ByteArrayInputStream in = new ByteArrayInputStream(testText.getBytes());%0A        System.setIn(in);%0A%0A        ConsoleInput input = new ConsoleInput();%0A        assertEquals(input.ask(%22Question%22), testText);%0A%0A    %7D%0A%0A    @Test%0A    public void whenAskForWrongReturnThanExpectedNotEqualsTwoValues() %7B%0A%0A        String testTextWrong = %22World%22;%0A        ByteArrayInputStream inSecond = new ByteArrayInputStream(testTextWrong.getBytes());%0A        System.setIn(inSecond);%0A%0A        ConsoleInput input = new ConsoleInput();%0A        assertNotEquals(input.ask(%22Question%22), %22Hello%22);%0A%0A    %7D%0A%0A    @Test%0A    public void whenSetQuestionThanGetOutputStreamvalue() %7B%0A%0A        ByteArrayOutputStream out = new ByteArrayOutputStream();%0A        System.setOut(new PrintStream(out));%0A%0A        ConsoleInput consoleInput = new ConsoleInput();%0A        consoleInput.ask(%22Question%22);%0A%0A        assertEquals(out.toString(),%22Question%22);%0A%0A    %7D%0A  %7D%0A

add ConsoleInputTest.java