4243444546474849505152
Runnable r1 = mockRunnable(); Runnable r2 = mockRunnable(); replay(); assertNull(e.push(Runnable.class, r1)); assertSame(r1, e.peek(Runnable.class)); assertSame(r1, e.push(Runnable.class, r2));
4647484950515253545556
assertNull(e.push(Runnable.class, r1)); assertSame(r1, e.peek(Runnable.class)); assertSame(r1, e.push(Runnable.class, r2)); assertSame(r2, e.peek(Runnable.class)); assertSame(r2, e.pop(Runnable.class)); assertSame(r1, e.pop(Runnable.class));
6566676869707172737475
Runnable r1 = mockRunnable(); Runnable r2 = mockRunnable(); replay(); e.push(Runnable.class, r1); e.push(Runnable.class, r2); e.clear(); assertNull(e.peek(Runnable.class));
6667686970717273747576
Runnable r2 = mockRunnable(); replay(); e.push(Runnable.class, r1); e.push(Runnable.class, r2); e.clear(); assertNull(e.peek(Runnable.class));
9899100101102103104105106107108
Environment e = new EnvironmentImpl(); Location l = mockLocation(); replay(); e.push(Location.class, l); assertSame(l, e.peekRequired(Location.class)); verify(); }
114115116117118119120121122123124
Location l = mockLocation(); Component c = mockComponent(); replay(); e.push(Location.class, l); e.push(Component.class, c); try { e.peekRequired(List.class);
115116117118119120121122123124125
Component c = mockComponent(); replay(); e.push(Location.class, l); e.push(Component.class, c); try { e.peekRequired(List.class); unreachable();