public void scanWithScanFilterMultipleConditionsTest() throws Exception {
ScanRequest request = getBasicReq();
final Map<String, Condition> conditionMap = new HashMap<String, Condition>();
//First condition
Condition rangeKeyCondition = new Condition();
List<AttributeValue> attributeValueList = new ArrayList<AttributeValue>();
attributeValueList.add(new AttributeValue().withN("4"));
rangeKeyCondition.setAttributeValueList(attributeValueList);
rangeKeyCondition.setComparisonOperator(ComparisonOperator.EQ);
conditionMap.put("range", rangeKeyCondition);
//Second condition
//Note: this is purely for testing; in real applications, conditions would probably use different attributes
rangeKeyCondition = new Condition();
attributeValueList = new ArrayList<AttributeValue>();
attributeValueList.add(new AttributeValue().withN("4"));
rangeKeyCondition.setAttributeValueList(attributeValueList);
rangeKeyCondition.setComparisonOperator(ComparisonOperator.EQ);
conditionMap.put("second", rangeKeyCondition);
request.setScanFilter(conditionMap);
ScanResult result = getClient().scan(request);