@@ -0,0 +1,1144 @@
+package com.openxc.messages;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0Aimport static org.hamcrest.Matchers.*;%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.robolectric.RobolectricTestRunner;%0Aimport org.robolectric.annotation.Config;%0A%0Aimport android.os.Parcel;%0A%0A@Config(emulateSdk = 18, manifest = Config.NONE)%0A@RunWith(RobolectricTestRunner.class)%0Apublic class MessageKeyTest %7B%0A    MessageKey key;%0A    Map%3CString, Object%3E parts = new HashMap%3C%3E();%0A%0A    @Before%0A    public void setup() %7B%0A        parts.put(%22foo%22, %22bar%22);%0A        key = new MessageKey(parts);%0A    %7D%0A%0A    @Test%0A    public void writeAndReadFromParcel() %7B%0A        Parcel parcel = Parcel.obtain();%0A        key.writeToParcel(parcel, 0);%0A%0A        // Reset parcel for reading%0A        parcel.setDataPosition(0);%0A%0A        MessageKey createdFromParcel =%0A                MessageKey.CREATOR.createFromParcel(parcel);%0A        assertThat(createdFromParcel, instanceOf(MessageKey.class));%0A        assertEquals(key, createdFromParcel);%0A    %7D%0A%7D%0A

Test MessageKey parcel and unparceling.