### Question:
Tokenizer { public List<CssToken> tokenize(String css) { List<Token> tokenList = CssLexer.create().lex(css); List<Token> cloneTokenList = new ArrayList<>(tokenList); cloneTokenList.remove(cloneTokenList.size() - 1); return cloneTokenList.stream().map(CssToken::new).collect(Collectors.toList()); }  List<CssToken> tokenize(String css);  }### Answer:
@Test public void scss_variable() { assertToken("$font-stack: Helvetica;", 0, "$font-stack", CssTokenType.DOLLAR_IDENTIFIER); assertToken("$message-color: blue !default;", 4, "default", CssTokenType.IDENTIFIER); List<CssToken> tokenList = tokenizer.tokenize("p.message-#{$alertClass} { color: red; }"); assertThat(tokenList.size()).isEqualTo(13); assertToken(tokenList, 0, "p", CssTokenType.IDENTIFIER); assertToken(tokenList, 1, ".", CssTokenType.PUNCTUATOR); assertToken(tokenList, 2, "message-", CssTokenType.IDENTIFIER); assertToken(tokenList, 3, "#", CssTokenType.PUNCTUATOR); assertToken(tokenList, 4, "{", CssTokenType.PUNCTUATOR); assertToken(tokenList, 5, "$alertClass", CssTokenType.DOLLAR_IDENTIFIER); assertToken(tokenList, 6, "}", CssTokenType.PUNCTUATOR); assertToken(tokenList, 7, "{", CssTokenType.PUNCTUATOR); assertToken(tokenList, 8, "color", CssTokenType.IDENTIFIER); assertToken(tokenList, 9, ":", CssTokenType.PUNCTUATOR); assertToken(tokenList, 10, "red", CssTokenType.IDENTIFIER); assertToken(tokenList, 11, ";", CssTokenType.PUNCTUATOR); assertToken(tokenList, 12, "}", CssTokenType.PUNCTUATOR); }
@Test public void scss_import() { List<CssToken> tokenList = tokenizer.tokenize("@import 'base';"); assertThat(tokenList.size()).isEqualTo(3); assertToken(tokenList, 0, "@import", CssTokenType.AT_IDENTIFIER); assertToken(tokenList, 1, "'base'", CssTokenType.STRING); assertToken(tokenList, 2, ";", CssTokenType.PUNCTUATOR); }
@Test public void scss_role() { List<CssToken> tokenList = tokenizer.tokenize("article[role=\"main\"] { width: 1px; }"); assertThat(tokenList.size()).isEqualTo(12); assertToken(tokenList, 0, "article", CssTokenType.IDENTIFIER); assertToken(tokenList, 1, "[", CssTokenType.PUNCTUATOR); assertToken(tokenList, 2, "role", CssTokenType.IDENTIFIER); assertToken(tokenList, 3, "=", CssTokenType.PUNCTUATOR); assertToken(tokenList, 4, "\"main\"", CssTokenType.STRING); assertToken(tokenList, 5, "]", CssTokenType.PUNCTUATOR); }