}
@Test
public void joinOneDimension() {
// 1 dimension
IntegerBoxes first = getSingleBoxAndVerify(new IntervalValue(1, 2));
IntegerBoxes second = getSingleBoxAndVerify(new IntervalValue(2, 4));
verifyResult(first.join(second), prepareBox(new IntervalValue(1, 4)));
verifyResult(second.join(first), prepareBox(new IntervalValue(1, 4)));
first = getSingleBoxAndVerify(new IntervalValue(1, 2));
second = getSingleBoxAndVerify(new IntervalValue(3, 4));
verifyResult(first.join(second), prepareBox(new IntervalValue(1, 4)));
verifyResult(second.join(first), prepareBox(new IntervalValue(1, 4)));
first = getSingleBoxAndVerify(new IntervalValue(1, 2));
second = getSingleBoxAndVerify(new IntervalValue(4, 5));
verifyResult(first.join(second), prepareBox(new IntervalValue(1, 2)), prepareBox(new IntervalValue(4, 5)));
verifyResult(second.join(first), prepareBox(new IntervalValue(1, 2)), prepareBox(new IntervalValue(4, 5)));
first = first.join(second);
second = getSingleBoxAndVerify(new IntervalValue(3, Double.POSITIVE_INFINITY));
verifyResult(first.join(second), prepareBox(new IntervalValue(1, Double.POSITIVE_INFINITY)));
verifyResult(second.join(first), prepareBox(new IntervalValue(1, Double.POSITIVE_INFINITY)));
}