can you add tests for the instance `beforeX` and `afterX` cases?