Add test for #18, #19, #20