@Test public void onPlaybackStatusChanged() {

  when(mockPlayback.getState())
      .thenReturn(PlaybackStateCompat.STATE_PLAYING)
      .thenReturn(PlaybackStateCompat.STATE_STOPPED);
  playbackManager.onPlaybackStatusChanged();
  verify(mockServiceCallback, times(1)).onPlaybackStateUpdated(any(PlaybackStateCompat.class));
  verify(mockServiceCallback, times(1)).onNotificationRequired();
  playbackManager.onPlaybackStatusChanged();
  verify(mockServiceCallback, times(2)).onPlaybackStateUpdated(any(PlaybackStateCompat.class));
  verifyNoMoreInteractions(mockServiceCallback);
}