SequenceItem implements MaterialTapTargetPrompt.PromptStateChangeListener { public void finish() { final MaterialTapTargetPrompt prompt = this.sequenceState.getPrompt(); if (prompt != null) { prompt.finish(); } } SequenceItem(@NonNull final SequenceState state); void addStateChanger(final int state); void removeStateChanger(final int state); void clearStateChangers(); void setSequenceListener(@Nullable final MaterialTapTargetSequence.SequenceCompleteListener listener); @NonNull SequenceState getState(); void show(); void finish(); void dismiss(); @Override void onPromptStateChanged(@NonNull final MaterialTapTargetPrompt prompt, final int state);  }
@Test public void testNullPromptFinish() { final SequenceState state = new SequenceState(null); final SequenceItem sequenceItem = new SequenceItem(state); sequenceItem.finish(); }