use of com.amazonaws.services.simpledb.model.UpdateCondition in project camel by apache.
the class SdbComponentTest method putAttributesItemNameIsRequired.
@Test
public void putAttributesItemNameIsRequired() {
final List<ReplaceableAttribute> replaceableAttributes = Arrays.asList(new ReplaceableAttribute[] { new ReplaceableAttribute("NAME1", "VALUE1", true) });
final UpdateCondition updateCondition = new UpdateCondition("NAME1", "VALUE1", true);
Exchange exchange = template.send("direct:start", new Processor() {
public void process(Exchange exchange) throws Exception {
exchange.getIn().setHeader(SdbConstants.OPERATION, SdbOperations.PutAttributes);
exchange.getIn().setHeader(SdbConstants.UPDATE_CONDITION, updateCondition);
exchange.getIn().setHeader(SdbConstants.REPLACEABLE_ATTRIBUTES, replaceableAttributes);
}
});
Exception exception = exchange.getException();
assertTrue(exception instanceof IllegalArgumentException);
}
Aggregations