String hashCode = "hash2";
DynamoDBQueryExpression query =
new DynamoDBQueryExpression(new AttributeValue().withS(hashCode));
Condition rangeKeyCondition = new Condition();
List<AttributeValue> attributeValueList = new ArrayList<AttributeValue>();
attributeValueList.add(new AttributeValue().withS("range2x"));
attributeValueList.add(new AttributeValue().withS("range2y"));
rangeKeyCondition.setAttributeValueList(attributeValueList);
rangeKeyCondition.setComparisonOperator(ComparisonOperator.BETWEEN);
query.setRangeKeyCondition(rangeKeyCondition);
List<TestClassWithHashRangeKey> valueList = mapper.query(TestClassWithHashRangeKey.class, query);
Assert.assertNotNull("Value list is null.", valueList);
Assert.assertEquals("Value list should be empty.", 0, valueList.size());