assertEquals("", Attributes.readString(e1, "outofrange"));
}
@Test
public void testSplitExtractor() throws IOException, InterruptedException {
MemorySinkSource mem = new MemorySinkSource();
SplitExtractor re1 = new SplitExtractor(mem, "\\.", 1, "dot");
SplitExtractor re2 = new SplitExtractor(re1, ":", 1, "colon");
SplitExtractor re3 = new SplitExtractor(re2, "foobar", 1, "foobar");
SplitExtractor re4 = new SplitExtractor(re3, "#", 1, "empty");
SplitExtractor re5 = new SplitExtractor(re4, "foobar", 2, "outofrange");
SplitExtractor re = new SplitExtractor(re5, "\\.|:|foobar", 3, "disj");
re.open();
re.append(new EventImpl("1:2:3.4foobar5".getBytes()));
re.close();
mem.close();
mem.open();
Event e1 = mem.next();
assertEquals("4foobar5", Attributes.readString(e1, "dot"));
assertEquals("2", Attributes.readString(e1, "colon"));
assertEquals("5", Attributes.readString(e1, "foobar"));
assertEquals("4", Attributes.readString(e1, "disj"));
assertEquals("", Attributes.readString(e1, "empty"));