+package eu.svjatoslav.commons.string.tokenizer;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+public class TokenizerTest {
+
+
+ @Test
+ public void peekNextToken() throws Exception {
+ Tokenizer tokenizer = new Tokenizer("this is a test")
+ .addTerminator(" ", Terminator.TerminationStrategy.DROP);
+
+ tokenizer.expectAndConsumeNextToken("this");
+
+ assertEquals("is", tokenizer.peekNextToken().token);
+
+ assertEquals("is", tokenizer.peekNextToken().token);
+
+ assertEquals(true, tokenizer.peekIsOneOf("maybe", "is", "that"));
+ }
+
+}
\ No newline at end of file