Add unit test for blackhole invariant check