Fixed test code.
Improving for simplify implementation.