TokenImpl implements Token { @Override public boolean containsNonSpace() { return containsNonSpace; } TokenImpl(Tokenizer tokenizer); TokenType getType(); boolean isFirst(); boolean isLast(); @Override void setLast(boolean value); int getIndex(); int getSubIndex(); @Override void setValue(char c); @Override char[] getValueChars(); @Override int getValueLength(); String getValue(); @Override boolean valueEquals(String v); @Override String getSegmentType(); @Override void setSegmentType(String s); @Override boolean containsNonSpace(); @Override String toString(); String getElementId(); @Override void resetIndexes(); @Override void resetSubElementIndex(); @Override void incrementIndex(); @Override void incrementSubElementIndex(); @Override void setType(TokenType tokenType); @Override void append(char c); @Override void resetValue();  }
@Test public void testContainsNonSpace() { assertFalse(token.containsNonSpace()); token.append(' '); assertFalse(token.containsNonSpace()); token.append(' '); assertFalse(token.containsNonSpace()); token.append('x'); assertTrue(token.containsNonSpace()); token.resetValue(); assertFalse(token.containsNonSpace()); token.append('1'); assertTrue(token.containsNonSpace()); }