Token tok = new Token();
boolean seenDogs = false;
while ((tok = nptf.next(tok)) != null){
if (tok.termText().equals("dogs")){
seenDogs = true;
assertTrue(tok.type() + " is not equal to " + "D", tok.type().equals("D") == true);
assertTrue("tok.getPayload() is null and it shouldn't be", tok.getPayload() != null);
byte [] bytes = tok.getPayload().getData();//safe here to just use the bytes, otherwise we should use offset, length
assertTrue(bytes.length + " does not equal: " + tok.getPayload().length(), bytes.length == tok.getPayload().length());
assertTrue(tok.getPayload().getOffset() + " does not equal: " + 0, tok.getPayload().getOffset() == 0);
float pay = PayloadHelper.decodeFloat(bytes);