Ray Collision with BoundingBox has unexpected behavior

I’ve been working on doing some collisions with rays and BoundingBoxes and found some behavior that seems unexpected. Whenever I have an Ray point at a volume, but the volume is beyond the limit of the Ray, a collision is still being detected. Additionally, it seems collisions are being detected along the negative axis of the ray, i.e. when the ray is pointed away from the volume.
Both of these seem very odd to me and I was wondering if this behavior is intended. I’ve compiled some unit tests around how I believe the collision should be registered, am I off the rocker, or is this behaving strangely?

public class JmonkeyTest {

    @Test //Passes
    public void testCollisionWhilePointedAtVolume() {
        BoundingVolume volume = new BoundingBox(Vector3f.ZERO, 1, 1, 1);
        Ray ray = new Ray(new Vector3f(10f, 0f, 0f), new Vector3f(-1, 0f, 0f));
        CollisionResults results = new CollisionResults();
        ray.collideWith(volume, results);
        assertTrue(results.size() > 0);
    }
    //Edit : This one was failing due to an assertion in Ray:479
    //@Test 
    //public void testNoCollisionPointedAway() {
    //    BoundingVolume volume = new BoundingBox(Vector3f.ZERO, 1, 1, 1);
    //    Ray ray = new Ray(new Vector3f(10f, 0f, 0f), new Vector3f(100, 0f, 0f));
    //    CollisionResults results = new CollisionResults();
    //    ray.collideWith(volume, results);
    //    assertTrue(results.size() == 0);
    //}


    @Test //Fails
    public void testNoCollisionWhenOutsideLimit() {
        BoundingVolume volume = new BoundingBox(Vector3f.ZERO, 1, 1, 1);
        Ray ray = new Ray(new Vector3f(10f, 0f, 0f), new Vector3f(-1, 0f, 0f));
        ray.setLimit(1);
        CollisionResults results = new CollisionResults();
        ray.collideWith(volume, results);
        assertTrue(results.size() == 0);
    }
}

What version of JME are you using?

Edit: also I guess you are saying that some of those tests are failing? All of those tests? Which ones exactly?

I’m using version 3.2.0-stable. I’m expecting all of these tests to pass, but only the first one does. I wanted to make sure this was a bug before I filed an issue and not just an unanticipated feature.

Edit: Test 2 was failing because it wasn’t a unit vector. Ray:479. Potentially that should be a thrown exception instead of an assert, but that is a problem for another day

Nah, you wouldn’t want a relatively expensive check like that happening all the time.