Fixed compilation warning.
Refactored unit tests.