@@ -0,0 +1,2626 @@
+package com.facebook.react.tests.core;%0A%0Aimport static org.fest.assertions.api.Assertions.assertThat;%0A%0Aimport android.support.test.runner.AndroidJUnit4;%0Aimport com.facebook.react.bridge.UnexpectedNativeTypeException;%0Aimport com.facebook.react.bridge.WritableNativeArray;%0Aimport com.facebook.react.bridge.WritableNativeMap;%0Aimport org.junit.Assert;%0Aimport org.junit.Before;%0Aimport org.junit.Ignore;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0A%0A@RunWith(AndroidJUnit4.class)%0Apublic class WritableNativeMapTest %7B%0A%0A  private WritableNativeMap mMap;%0A%0A  @Before%0A  public void setup() %7B%0A    mMap = new WritableNativeMap();%0A    mMap.putBoolean(%22boolean%22, true);%0A    mMap.putDouble(%22double%22, 1.2);%0A    mMap.putInt(%22int%22, 1);%0A    mMap.putString(%22string%22, %22abc%22);%0A    mMap.putMap(%22map%22, new WritableNativeMap());%0A    mMap.putArray(%22array%22, new WritableNativeArray());%0A    mMap.putBoolean(%22dvacca%22, true);%0A    mMap.setUseNativeAccessor(true);%0A  %7D%0A%0A  @Test%0A  public void testBoolean() %7B%0A    assertThat(mMap.getBoolean(%22boolean%22)).isEqualTo(true);%0A  %7D%0A%0A  @Test(expected = UnexpectedNativeTypeException.class)%0A  public void testBooleanInvalidType() %7B%0A    mMap.getBoolean(%22string%22);%0A  %7D%0A%0A  @Test%0A  public void testDouble() %7B%0A    assertThat(mMap.getDouble(%22double%22)).isEqualTo(1.2);%0A  %7D%0A%0A  @Test(expected = UnexpectedNativeTypeException.class)%0A  public void testDoubleInvalidType() %7B%0A    mMap.getDouble(%22string%22);%0A  %7D%0A%0A  @Test%0A  public void testInt() %7B%0A    assertThat(mMap.getInt(%22int%22)).isEqualTo(1);%0A  %7D%0A%0A  @Test(expected = UnexpectedNativeTypeException.class)%0A  public void testIntInvalidType() %7B%0A    mMap.getInt(%22string%22);%0A  %7D%0A%0A  @Test%0A  public void testString() %7B%0A    assertThat(mMap.getString(%22string%22)).isEqualTo(%22abc%22);%0A  %7D%0A%0A  @Test(expected = UnexpectedNativeTypeException.class)%0A  public void testStringInvalidType() %7B%0A    mMap.getString(%22int%22);%0A  %7D%0A%0A  @Test%0A  public void testMap() %7B%0A    assertThat(mMap.getMap(%22map%22)).isNotNull();%0A  %7D%0A%0A  @Test(expected = UnexpectedNativeTypeException.class)%0A  public void testMapInvalidType() %7B%0A    mMap.getMap(%22string%22);%0A  %7D%0A%0A  @Test%0A  public void testArray() %7B%0A    assertThat(mMap.getArray(%22array%22)).isNotNull();%0A  %7D%0A%0A  @Test(expected = UnexpectedNativeTypeException.class)%0A  public void testArrayInvalidType() %7B%0A    mMap.getArray(%22string%22);%0A  %7D%0A%0A  @Ignore(%22Needs to be implemented%22)%0A  @Test%0A  public void testErrorMessageContainsKey() %7B%0A    String key = %22fkg%22;%0A    try %7B%0A      mMap.getString(key);%0A      Assert.fail(%22Expected an UnexpectedNativeTypeException to be thrown%22);%0A    %7D catch (UnexpectedNativeTypeException e) %7B%0A      assertThat(e.getMessage()).contains(key);%0A    %7D%0A  %7D%0A%7D%0A

Add test for WritableNativeMap