Write test for whoami handler