public BoundingBox extendBoundingBox(BoundingBox boundingBox) {
        return new BoundingBox(Math.min(this.minLatitude, boundingBox.minLatitude),
                Math.min(this.minLongitude, boundingBox.minLongitude),
                Math.max(this.maxLatitude, boundingBox.maxLatitude),
                Math.max(this.maxLongitude, boundingBox.maxLongitude));
    }
@Test
    public void extendBoundingBoxTest() {
        BoundingBox boundingBox1 = new BoundingBox(MIN_LATITUDE, MIN_LONGITUDE, MAX_LATITUDE, MAX_LONGITUDE);
        BoundingBox boundingBox2 = new BoundingBox(MIN_LATITUDE - 1, MIN_LONGITUDE - 1, MAX_LATITUDE,
                MAX_LONGITUDE);
        BoundingBox boundingBox3 = new BoundingBox(MIN_LATITUDE, MIN_LONGITUDE, MAX_LATITUDE + 1,
                MAX_LONGITUDE + 1);

        Assert.assertEquals(boundingBox1, boundingBox1.extendBoundingBox(boundingBox1));
        Assert.assertEquals(boundingBox2, boundingBox1.extendBoundingBox(boundingBox2));
        Assert.assertEquals(boundingBox3, boundingBox1.extendBoundingBox(boundingBox3));
    }