@ThreadedTest public void getPosition_atEndOfLastMethod() throws Exception { control.add(0, 0); CodePosition cp = recorder.atEndOfLastMethod().position(); CodePosition verification = ic.atMethodEnd(SimpleClass.class.getDeclaredMethod("add", int.class, int.class)); assertTrue(verification.matches(cp)); }
@ThreadedTest public void getPosition_atEnd() throws Exception { final SimpleInteger value = new SimpleInteger(0); CodePosition cp = recorder.atEndOf(control.add(value, value)).position(); CodePosition verification = ic.atMethodEnd( SimpleClass.class.getDeclaredMethod("add", SimpleInteger.class, SimpleInteger.class)); assertTrue(verification.matches(cp)); }