media/version-compat-tests/previous/service/src/androidTest/java/android/support/mediacompat/service/MediaSessionCompatCallbackTest.java
@Test
    @SmallTest
    public void testSessionToken() throws Exception {
        MediaSessionCompat.Token sessionToken = mSession.getSessionToken();

        assertNotNull(sessionToken);
        assertEquals(0, sessionToken.describeContents());

        // Test writeToParcel
        Parcel p = Parcel.obtain();
        sessionToken.writeToParcel(p, 0);
        p.setDataPosition(0);
        MediaSessionCompat.Token token = MediaSessionCompat.Token.CREATOR.createFromParcel(p);
        assertEquals(token, sessionToken);
        p.recycle();
    }
/**
     * Tests {@link MediaSessionCompat.Token} created in the constructor of MediaSessionCompat.
     */
Tests  MediaSessionCompat.Token created in the constructor of MediaSessionCompat.
Tests MediaSessionCompat . Token created in the constructor of MediaSessionCompat .
@Test
    @SmallTest
    public void testSessionToken() throws Exception {
        MediaSessionCompat.Token sessionToken = mSession.getSessionToken();
        assertNotNull(sessionToken);
        assertEquals(0, sessionToken.describeContents());
        Parcel p = Parcel.obtain();
        sessionToken.writeToParcel(p, 0);
        p.setDataPosition(0);
        MediaSessionCompat.Token token = MediaSessionCompat.Token.CREATOR.createFromParcel(p);
        assertEquals(token, sessionToken);
        p.recycle();
    }
@ Test @ SmallTest public void testSessionToken ( ) throws Exception { MediaSessionCompat . Token sessionToken = mSession . getSessionToken ( ) ; assertNotNull ( sessionToken ) ; assertEquals ( 0 , sessionToken . describeContents ( ) ) ; Parcel p = Parcel . obtain ( ) ; sessionToken . writeToParcel ( p , 0 ) ; p . setDataPosition ( 0 ) ; MediaSessionCompat . Token token = MediaSessionCompat . Token . CREATOR . createFromParcel ( p ) ; assertEquals ( token , sessionToken ) ; p . recycle ( ) ; }
Tests {@link MediaSessionCompat.Token} created in the constructor of MediaSessionCompat.
Tests { @link MediaSessionCompat . Token } created in the constructor of MediaSessionCompat .
// Test writeToParcel