Added unit-tests for print method