car/src/androidTest/java/androidx/car/navigation/utils/BundleMarshallerTest.java
@Test
    public void serialization_nullCase() {
        new TestBundlable().toBundle(mBundleMarshaller);

        Bundle data = mBundleMarshaller.getBundle();
        assertTrue(data.containsKey("intValue"));
        assertEquals(0, data.getInt("intValue"));
        assertNull(data.getString("stringValue"));
        assertNull(data.getString("enumValue"));
        assertTrue(data.getBoolean("bundlableValue._isNull"));
        assertEquals(-1, data.getInt("bundlableListValue._size"));
    }
/**
     * Tests that null values are serialized as expected.
     */
Tests that null values are serialized as expected.
Tests that null values are serialized as expected .
@Test
    public void serialization_nullCase() {
        new TestBundlable().toBundle(mBundleMarshaller);
        Bundle data = mBundleMarshaller.getBundle();
        assertTrue(data.containsKey("intValue"));
        assertEquals(0, data.getInt("intValue"));
        assertNull(data.getString("stringValue"));
        assertNull(data.getString("enumValue"));
        assertTrue(data.getBoolean("bundlableValue._isNull"));
        assertEquals(-1, data.getInt("bundlableListValue._size"));
    }
@ Test public void serialization_nullCase ( ) { new TestBundlable ( ) . toBundle ( mBundleMarshaller ) ; Bundle data = mBundleMarshaller . getBundle ( ) ; assertTrue ( data . containsKey ( "intValue" ) ) ; assertEquals ( 0 , data . getInt ( "intValue" ) ) ; assertNull ( data . getString ( "stringValue" ) ) ; assertNull ( data . getString ( "enumValue" ) ) ; assertTrue ( data . getBoolean ( "bundlableValue._isNull" ) ) ; assertEquals ( - 1 , data . getInt ( "bundlableListValue._size" ) ) ; }
Tests that null values are serialized as expected.
Tests that null values are serialized as expected .