Refactory unit test coding style