Unit test for stock correction