Implement tests for US#04
Fix code for US#04