Shorten test code to essential part.