projects/moments/app/src/test/java/io/v/moments/lib/DiscoveredListTest.java
/**
     * Handle the loss of a non-self advertisement.
     */
Handle the loss of a non-self advertisement.
Handle the loss of a non - self advertisement .
@Test
    public void handleNormalLost() throws Exception {
        mList.setObserver(mObserver);
        mList.add(0, THING0);
        verify(mObserver).notifyItemInserted(0);
        assertEquals(1, mList.size());
        mList.handleLostAdvertisement(mAdvertisement);
        verify(mHandler).post(mRunnable.capture());
        mRunnable.getValue().run();
        assertEquals(0, mList.size());
        verify(mObserver).notifyItemRemoved(0);
    }
@ Test public void handleNormalLost ( ) throws Exception { mList . setObserver ( mObserver ) ; mList . add ( 0 , THING0 ) ; verify ( mObserver ) . notifyItemInserted ( 0 ) ; assertEquals ( 1 , mList . size ( ) ) ; mList . handleLostAdvertisement ( mAdvertisement ) ; verify ( mHandler ) . post ( mRunnable . capture ( ) ) ; mRunnable . getValue ( ) . run ( ) ; assertEquals ( 0 , mList . size ( ) ) ; verify ( mObserver ) . notifyItemRemoved ( 0 ) ; }
Handle the loss of a non-self advertisement.
Handle the loss of a non - self advertisement .