}
private SelectResult mkSelectResult(String id, AWSResourceType resourceType, Resource.CleanupState state,
String description, String ownerEmail, String region, String terminationReason,
Date expectedTerminationTime, Date markTime, boolean optOut, String fieldName, String fieldValue) {
Item item = new Item();
List<Attribute> attrs = new LinkedList<Attribute>();
attrs.add(new Attribute(AWSResource.FIELD_RESOURCE_ID, id));
attrs.add(new Attribute(AWSResource.FIELD_RESOURCE_TYPE, resourceType.name()));
attrs.add(new Attribute(AWSResource.FIELD_DESCRIPTION, description));
attrs.add(new Attribute(AWSResource.FIELD_REGION, region));
attrs.add(new Attribute(AWSResource.FIELD_STATE, state.name()));
attrs.add(new Attribute(AWSResource.FIELD_OWNER_EMAIL, ownerEmail));
attrs.add(new Attribute(AWSResource.FIELD_TERMINATION_REASON, terminationReason));
attrs.add(new Attribute(AWSResource.FIELD_EXPECTED_TERMINATION_TIME,
AWSResource.DATE_FORMATTER.print(expectedTerminationTime.getTime())));
attrs.add(new Attribute(AWSResource.FIELD_MARK_TIME,
AWSResource.DATE_FORMATTER.print(markTime.getTime())));
attrs.add(new Attribute(AWSResource.FIELD_OPT_OUT_OF_JANITOR, String.valueOf(optOut)));
attrs.add(new Attribute(fieldName, fieldValue));
item.setAttributes(attrs);
item.setName(String.format("%s-%s-%s", resourceType.name(), id, region));
SelectResult result = new SelectResult();
result.setItems(Arrays.asList(item));
return result;
}