@Test
public void testComposeQueryWithOutTimeRange() {

  final Map<StatisticsId, InternalDataStatistics<SimpleFeature, ?, ?>> statsMap = new HashMap<>();
  final FeatureBoundingBoxStatistics geoStats = new FeatureBoundingBoxStatistics("geometry");
  statsMap.put(
      VectorStatisticsQueryBuilder.newBuilder().factory().bbox().fieldName(
          "geometry").build().getId(),
      geoStats);
  final SimpleFeature firstFeature =
      createGeoFeature(factory.createPoint(new Coordinate(22.25, 42.25)));
  geoStats.entryIngested(firstFeature);
  final SimpleFeature secondFeature =
      createGeoFeature(factory.createPoint(new Coordinate(27.25, 41.25)));
  geoStats.entryIngested(secondFeature);
  final Envelope bounds = new Envelope(21.23, 26.23, 41.75, 43.1);
  final BasicQueryByClass query =
      new BasicQueryByClass(
          QueryIndexHelper.composeConstraints(
              geoType,
              geoTimeDescriptors,
              statsMap,
              new GeometryFactory().toGeometry(bounds),
              null));
  final List<MultiDimensionalNumericData> nd = query.getIndexConstraints(SPATIAL_INDEX);
  assertEquals(21.23, nd.get(0).getDataPerDimension()[0].getMin(), 0.0001);
  assertEquals(26.23, nd.get(0).getDataPerDimension()[0].getMax(), 0.0001);
  assertEquals(41.75, nd.get(0).getDataPerDimension()[1].getMin(), 0.0001);
  assertEquals(43.1, nd.get(0).getDataPerDimension()[1].getMax(), 0.0001);
}