Remove useless method calls in unit tests