@Test public void should_validate_clustering_components() throws Exception {
  UUID uuid1=new UUID(10,11);
  UUID uuid2=new UUID(10,12);
  OrderingMode ordering=OrderingMode.DESCENDING;
  List<Object> clusteringsFrom=Arrays.<Object>asList(uuid1,"author",3);
  List<Object> clusteringsTo=Arrays.<Object>asList(uuid1,"author",4);
  sliceQuery=new SliceQuery<>(Object.class,meta,Arrays.<Object>asList(10L),clusteringsFrom,clusteringsTo,ordering,BoundingMode.INCLUSIVE_BOUNDS,null,100,100,false);
  validator.validateComponentsForSliceQuery(sliceQuery);
  clusteringsFrom=Arrays.<Object>asList(uuid1,"author",3);
  clusteringsTo=Arrays.<Object>asList(uuid1,"author",null);
  sliceQuery=new SliceQuery<>(Object.class,meta,Arrays.<Object>asList(10L),clusteringsFrom,clusteringsTo,ordering,BoundingMode.INCLUSIVE_BOUNDS,null,100,100,false);
  validator.validateComponentsForSliceQuery(sliceQuery);
  clusteringsFrom=Arrays.<Object>asList(uuid1,"author",null);
  clusteringsTo=Arrays.<Object>asList(uuid1,"author",3);
  ordering=OrderingMode.ASCENDING;
  sliceQuery=new SliceQuery<>(Object.class,meta,Arrays.<Object>asList(10L),clusteringsFrom,clusteringsTo,ordering,BoundingMode.INCLUSIVE_BOUNDS,null,100,100,false);
  validator.validateComponentsForSliceQuery(sliceQuery);
  clusteringsFrom=Arrays.<Object>asList(uuid1,"a",null);
  clusteringsTo=Arrays.<Object>asList(uuid1,"b",null);
  ordering=OrderingMode.DESCENDING;
  sliceQuery=new SliceQuery<>(Object.class,meta,Arrays.<Object>asList(10L),clusteringsFrom,clusteringsTo,ordering,BoundingMode.INCLUSIVE_BOUNDS,null,100,100,false);
  validator.validateComponentsForSliceQuery(sliceQuery);
  clusteringsFrom=Arrays.<Object>asList(uuid1,"a",null);
  clusteringsTo=Arrays.<Object>asList(uuid1,null,null);
  ordering=OrderingMode.ASCENDING;
  sliceQuery=new SliceQuery<>(Object.class,meta,Arrays.<Object>asList(10L),clusteringsFrom,clusteringsTo,ordering,BoundingMode.INCLUSIVE_BOUNDS,null,100,100,false);
  validator.validateComponentsForSliceQuery(sliceQuery);
  clusteringsFrom=Arrays.<Object>asList(uuid1,null,null);
  clusteringsTo=Arrays.<Object>asList(uuid1,"b",null);
  ordering=OrderingMode.ASCENDING;
  sliceQuery=new SliceQuery<>(Object.class,meta,Arrays.<Object>asList(10L),clusteringsFrom,clusteringsTo,ordering,BoundingMode.INCLUSIVE_BOUNDS,null,100,100,false);
  validator.validateComponentsForSliceQuery(sliceQuery);
  clusteringsFrom=Arrays.<Object>asList(uuid1,null,null);
  clusteringsTo=Arrays.<Object>asList(uuid2,null,null);
  ordering=OrderingMode.DESCENDING;
  sliceQuery=new SliceQuery<>(Object.class,meta,Arrays.<Object>asList(10L),clusteringsFrom,clusteringsTo,ordering,BoundingMode.INCLUSIVE_BOUNDS,null,100,100,false);
  validator.validateComponentsForSliceQuery(sliceQuery);
  clusteringsFrom=Arrays.<Object>asList(uuid1,"a",null);
  clusteringsTo=Arrays.<Object>asList(uuid1,"a",null);
  ordering=OrderingMode.DESCENDING;
  sliceQuery=new SliceQuery<>(Object.class,meta,Arrays.<Object>asList(10L),clusteringsFrom,clusteringsTo,ordering,BoundingMode.INCLUSIVE_BOUNDS,null,100,100,false);
  validator.validateComponentsForSliceQuery(sliceQuery);
  clusteringsFrom=Arrays.<Object>asList(10L);
  clusteringsTo=Arrays.<Object>asList(10L);
  ordering=OrderingMode.ASCENDING;
  sliceQuery=new SliceQuery<>(Object.class,meta,Arrays.<Object>asList(10L),clusteringsFrom,clusteringsTo,ordering,BoundingMode.INCLUSIVE_BOUNDS,null,100,100,false);
  validator.validateComponentsForSliceQuery(sliceQuery);
  clusteringsFrom=Arrays.<Object>asList(10L);
  clusteringsTo=Arrays.asList();
  sliceQuery=new SliceQuery<>(Object.class,meta,Arrays.<Object>asList(10L),clusteringsFrom,clusteringsTo,ordering,BoundingMode.INCLUSIVE_BOUNDS,null,100,100,false);
  validator.validateComponentsForSliceQuery(sliceQuery);
  clusteringsFrom=Arrays.asList();
  clusteringsTo=Arrays.<Object>asList(10L);
  sliceQuery=new SliceQuery<>(Object.class,meta,Arrays.<Object>asList(10L),clusteringsFrom,clusteringsTo,ordering,BoundingMode.INCLUSIVE_BOUNDS,null,100,100,false);
  validator.validateComponentsForSliceQuery(sliceQuery);
}
