use of org.apache.apex.malhar.contrib.nifi.mock.MockDataPacket in project apex-malhar by apache.
the class NiFiSinglePortInputOperatorTest method getDataPacket.
@NotNull
private DataPacket getDataPacket(final String id) {
Map<String, String> attrs = new HashMap<>();
attrs.put("keyA", "valA");
attrs.put("keyB", "valB");
attrs.put("key" + id, "val" + id);
byte[] content = ("content" + id).getBytes(StandardCharsets.UTF_8);
ByteArrayInputStream in = new ByteArrayInputStream(content);
return new MockDataPacket(attrs, in, content.length);
}
Aggregations