@Test public void testAir() { FakeBlockCache bc = new FakeBlockCache(); InteractRayTracing rt = new InteractRayTracing(); rt.setBlockCache(bc); double[] coords = new double[] {0.5, 0.5, -0.5, 0.5, 0.5, 1.5}; rt.set(coords[0], coords[1], coords[2], coords[3], coords[4], coords[5]); rt.loop(); if (rt.collides()) { TestRayTracing.doFail("Expect not to collide with air.", coords); } if (rt.getStepsDone() > 4) { TestRayTracing.doFail( "Expect less than 4 steps for moving straight through a block of air.", coords); } rt.cleanup(); bc.cleanup(); }