Test cases for #5 and #6

#5 #6