@Test
public void testOverlap_After_After() {
TryListBuilder tlb = new TryListBuilder();
tlb.addHandler(0, 10, new ImmutableExceptionHandler("LException1;", 5));
tlb.addHandler(15, 20, new ImmutableExceptionHandler("LException2;", 6));
List<? extends TryBlock<? extends ExceptionHandler>> tryBlocks = tlb.getTryBlocks();
List<? extends TryBlock> expected = ImmutableList.of(
new ImmutableTryBlock(0, 10,
ImmutableList.of(new ImmutableExceptionHandler("LException1;", 5))),
new ImmutableTryBlock(15, 5,
ImmutableList.of(new ImmutableExceptionHandler("LException2;", 6))));
Assert.assertEquals(expected, tryBlocks);
}