car/src/androidTest/java/androidx/car/navigation/utils/BundleMarshallerTest.java
@Test
    public void serialization_nestedBundlable() {
        String stringValue = "TEST";
        int intValue = 1;

        new TestBundlable()
                .setBundlableValue(new TestBundlable()
                        .setInt(intValue)
                        .setString(stringValue))
                .toBundle(mBundleMarshaller);

        Bundle data = mBundleMarshaller.getBundle();
        assertTrue(data.containsKey("bundlableValue._isNull"));
        assertFalse(data.getBoolean("bundlableValue._isNull"));
        assertEquals(intValue, data.getInt("bundlableValue.intValue"));
        assertEquals(stringValue, data.getString("bundlableValue.stringValue"));
    }
/**
     * Tests that nested {@link Bundlable}s are serialized as expected.
     */
Tests that nested  Bundlables are serialized as expected.
Tests that nested Bundlables are serialized as expected .
@Test
    public void serialization_nestedBundlable() {
        String stringValue = "TEST";
        int intValue = 1;
        new TestBundlable()
                .setBundlableValue(new TestBundlable()
                        .setInt(intValue)
                        .setString(stringValue))
                .toBundle(mBundleMarshaller);
        Bundle data = mBundleMarshaller.getBundle();
        assertTrue(data.containsKey("bundlableValue._isNull"));
        assertFalse(data.getBoolean("bundlableValue._isNull"));
        assertEquals(intValue, data.getInt("bundlableValue.intValue"));
        assertEquals(stringValue, data.getString("bundlableValue.stringValue"));
    }
@ Test public void serialization_nestedBundlable ( ) { String stringValue = "TEST" ; int intValue = 1 ; new TestBundlable ( ) . setBundlableValue ( new TestBundlable ( ) . setInt ( intValue ) . setString ( stringValue ) ) . toBundle ( mBundleMarshaller ) ; Bundle data = mBundleMarshaller . getBundle ( ) ; assertTrue ( data . containsKey ( "bundlableValue._isNull" ) ) ; assertFalse ( data . getBoolean ( "bundlableValue._isNull" ) ) ; assertEquals ( intValue , data . getInt ( "bundlableValue.intValue" ) ) ; assertEquals ( stringValue , data . getString ( "bundlableValue.stringValue" ) ) ; }
Tests that nested {@link Bundlable}s are serialized as expected.
Tests that nested { @link Bundlable } s are serialized as expected .