package ru.alexandr;

import org.junit.Test;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;

public class CalculateTest {

       @Test
       public void whenAddOneToOneThenTwo() {
	 	ByteArrayOutputStream out = new ByteArrayOutputStream();
        	System.setOut(new PrintStream(out));
        	Calculate.main(null);
        	assertThat(out.toString(), is("Hello world!\r\n"));
    }
}

@@ -187,16 +187,106 @@
 tThat;%0A%0A
+/**%0A* Test.%0A*%0A* @author Alexandr Golubev (deed27@narod.ru)%0A* @version $Id$%0A* since 0.1%0A*/%0A
 public c
@@ -306,24 +306,39 @@
 eTest %7B%0A
-%0A       
+%09/**%0A%09* Test add.%0A%09*/%0A%09
 @Test%0A  
@@ -339,19 +339,16 @@
 est%0A    
-  
- 
 public v
@@ -359,34 +359,47 @@
 when
-AddOneToOneThenTwo
+ExecuteMainThenPrintToConsole
 () %7B%0A%09 
-%09
+   
 Byte
@@ -459,17 +459,16 @@
         
-%09
 System.s
@@ -504,17 +504,16 @@
         
-%09
 Calculat
@@ -534,17 +534,16 @@
         
-%09
 assertTh
@@ -594,8 +594,9 @@
     %7D%0A%7D%0A
+%0A

add CalculateTest.java