testLexerThrowsExceptionIfArrayIsNotValid