I checked for the edge case of more than 6 tokens and wrote test code to validate this. I return a non null String array, I am at a loss as to why I am not passing. It is not the most efficient code but as far as I understand it meets the requirements.