More code for getAnagramForMode
test