Code example for Entity

Methods: addSubValue

        phone.put(Data._ID, phoneId);
        phone.put(Data.MIMETYPE, Phone.CONTENT_ITEM_TYPE);
        phone.put(Phone.NUMBER, TEST_PHONE_NUMBER_1);
        phone.put(Phone.TYPE, Phone.TYPE_HOME);
        final Entity before = new Entity(contact);
        before.addSubValue(Data.CONTENT_URI, phone);
        return before;
     * Test that {@link EntityDelta#mergeAfter(EntityDelta)} correctly passes 
     * any changes through the {@link Parcel} object. This enforces that 
     * {@link EntityDelta} should be identical when serialized against the same 
     * "before" {@link Entity}. 
    public void testParcelChangesNone() { 
        final Entity before = getEntity(TEST_CONTACT_ID, TEST_PHONE_ID);
        final EntityDelta source = EntityDelta.fromBefore(before);
        final EntityDelta dest = EntityDelta.fromBefore(before);