import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; public class SimpleTest { private static BoxComputer computer; @BeforeClass public static void init() { computer = new DynamicBoxComputer(); } @Test public void test1() { Assert.assertEquals(1, computer.expectedMoves(1), 1e-8); } @Test public void test2() { Assert.assertEquals(169.0/120, computer.expectedMoves(2), 1e-8); } @Test public void test3() { Assert.assertEquals(105768167/59875200.0, computer.expectedMoves(3), 1e-8); } @Test public void test4() { Assert.assertEquals(2.1073229744269, computer.expectedMoves(4), 1e-8); } @Test public void test7() { Assert.assertEquals(3.0849969771204, computer.expectedMoves(7), 1e-8); } }