ChatState implements BabbleState { @Override public void reset() { mState.clear(); mNextIndex = 0; }  @Override Block processBlock(Block block); @Override void reset(); List<IMessage> getMessagesFromIndex(Integer index);  }
@Test public void resetTest() { ChatState chatState = new ChatState(); byte[][] txs = { new Message("hello camille, we need to talk!", "alice" ).toBytes() }; Block block = new Block(); block.body.transactions = txs; chatState.processBlock(block); chatState.reset(); List<IMessage> messages = chatState.getMessagesFromIndex(0); assertEquals(0, messages.size()); }