projects/moments/app/src/test/java/io/v/moments/lib/DiscoveredListTest.java
/**
     * Advertisements from others (not-self) should be handled/observed.
     */
Advertisements from others (not-self) should be handled/observed.
Advertisements from others ( not - self ) should be handled / observed .
@Test
    public void handleNormalFound() throws Exception {
        mList.setObserver(mObserver);
        when(mConverter.make(mAdvertisement)).thenReturn(THING0);
        mList.handleFoundAdvertisement(mAdvertisement);
        verify(mHandler).post(mRunnable.capture());
        mRunnable.getValue().run();
        assertEquals(1, mList.size());
        assertEquals(THING0, mList.get(0));
        verify(mObserver).notifyItemInserted(0);
    }
@ Test public void handleNormalFound ( ) throws Exception { mList . setObserver ( mObserver ) ; when ( mConverter . make ( mAdvertisement ) ) . thenReturn ( THING0 ) ; mList . handleFoundAdvertisement ( mAdvertisement ) ; verify ( mHandler ) . post ( mRunnable . capture ( ) ) ; mRunnable . getValue ( ) . run ( ) ; assertEquals ( 1 , mList . size ( ) ) ; assertEquals ( THING0 , mList . get ( 0 ) ) ; verify ( mObserver ) . notifyItemInserted ( 0 ) ; }
Advertisements from others (not-self) should be handled/observed.
Advertisements from others ( not - self ) should be handled / observed .