import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; public class SimpleTest { private static NextElement nextElement; @BeforeClass public static void init() { nextElement = new MyNextElement(); } @Test public void test1() { Assert.assertEquals(3, nextElement.next(0b11111, 2)); } @Test public void test2() { Assert.assertEquals(-1, nextElement.next(0b11111, 4)); } @Test public void test3() { Assert.assertEquals(2, nextElement.next(0b10100, 0)); } }