@Override
    public void execute() {
        ScanResponse result = ddbClient.scan(ScanRequest.builder().tableName(determineTableName()).limit(determineLimit())
                .exclusiveStartKey(determineExclusiveStartKey())
                .scanFilter(determineScanFilter()).build());

        Map<Object, Object> tmp = new HashMap<>();
        tmp.put(Ddb2Constants.ITEMS, result.items());
        tmp.put(Ddb2Constants.LAST_EVALUATED_KEY, result.hasLastEvaluatedKey() ? result.lastEvaluatedKey() : null);
        tmp.put(Ddb2Constants.CONSUMED_CAPACITY, result.consumedCapacity());
        tmp.put(Ddb2Constants.COUNT, result.count());
        tmp.put(Ddb2Constants.SCANNED_COUNT, result.scannedCount());
        addToResults(tmp);
    }
@Test
    public void execute() {
        Map<String, Condition> scanFilter = new HashMap<>();
        Condition.Builder condition = Condition.builder().comparisonOperator(ComparisonOperator.GT.toString())
                .attributeValueList(AttributeValue.builder().n("1985").build());
        scanFilter.put("year", condition.build());
        exchange.getIn().setHeader(Ddb2Constants.SCAN_FILTER, scanFilter);

        command.execute();

        Map<String, AttributeValue> mapAssert = new HashMap<>();
        mapAssert.put("1", AttributeValue.builder().s("LAST_KEY").build());

        ConsumedCapacity consumed = (ConsumedCapacity) exchange.getIn().getHeader(Ddb2Constants.CONSUMED_CAPACITY);
        assertEquals(scanFilter, ddbClient.scanRequest.scanFilter());
        assertEquals(Integer.valueOf(10), exchange.getIn().getHeader(Ddb2Constants.SCANNED_COUNT, Integer.class));
        assertEquals(Integer.valueOf(1), exchange.getIn().getHeader(Ddb2Constants.COUNT, Integer.class));
        assertEquals(Double.valueOf(1.0), consumed.capacityUnits());
        assertEquals(mapAssert, exchange.getIn().getHeader(Ddb2Constants.LAST_EVALUATED_KEY, Map.class));

        Map<?, ?> items = (Map<?, ?>) exchange.getIn().getHeader(Ddb2Constants.ITEMS, List.class).get(0);
        assertEquals(AttributeValue.builder().s("attrValue").build(), items.get("attrName"));
    }