* @throws InterruptedException
*/
@Test
public void checkAttrSynth() throws IOException, InterruptedException {
EventSource src = new AttrSynthSource(5, 10, 20, 15, 1337);
Event e = null;
EventSink snk = new ConsoleEventSink(new AvroJsonOutputFormat());
MemorySinkSource mem = new MemorySinkSource();
while ((e = src.next()) != null) {
snk.append(e); // visual inspection
mem.append(e); // testing
}
mem.open();
int i = 0;
while ((e = mem.next()) != null) {
i++;
Map<String, byte[]> ents = e.getAttrs();
assertEquals(10, ents.size()); // 10 generated + 1 (service)
for (String a : ents.keySet()) {
assertEquals(20, a.length());
}
for (byte[] v : ents.values()) {