@Test
public void testSubmitAndCheckSubmitBuffer() throws Exception {
SpyDefinition sdef = engine.add(spy.instrument("x").onSubmit(collector));
SpyContext ctx = engine.lookup(new SpyContext(sdef, "Class", "method", "()V", 1));
submitter.submit(ON_ENTER, ctx.getId(), SF_NONE, new Object[]{1L});
submitter.submit(ON_RETURN, ctx.getId(), SF_FLUSH, new Object[]{2L});
assertEquals(1, collector.size());
Map<String, Object> sr = collector.get(0);