This patch adds some missing tests for a couple of edge cases. Change-Id: I3929595fddca0628269af6235bbb0fca853ae3eb