### Question:
JavaOnlyArray implements ReadableArray, WritableArray { @Override public ReadableType getType(int index) { Object object = mBackingList.get(index); if (object == null) { return ReadableType.Null; } else if (object instanceof Boolean) { return ReadableType.Boolean; } else if (object instanceof Double || object instanceof Float || object instanceof Integer) { return ReadableType.Number; } else if (object instanceof String) { return ReadableType.String; } else if (object instanceof ReadableArray) { return ReadableType.Array; } else if (object instanceof ReadableMap) { return ReadableType.Map; } return null; } private  JavaOnlyArray(Object... values); private  JavaOnlyArray(List list);  JavaOnlyArray(); static JavaOnlyArray from(List list); static JavaOnlyArray of(Object... values); @Override int size(); @Override boolean isNull(int index); @Override double getDouble(int index); @Override int getInt(int index); @Override String getString(int index); @Override JavaOnlyArray getArray(int index); @Override boolean getBoolean(int index); @Override JavaOnlyMap getMap(int index); @Override Dynamic getDynamic(int index); @Override ReadableType getType(int index); @Override void pushBoolean(boolean value); @Override void pushDouble(double value); @Override void pushInt(int value); @Override void pushString(String value); @Override void pushArray(WritableArray array); @Override void pushMap(WritableMap map); @Override void pushNull(); @Override ArrayList<Object> toArrayList(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testGetType() throws Exception { JavaOnlyArray values = JavaOnlyArray.of( 1, 2f, 3., "4", false, JavaOnlyArray.of(), JavaOnlyMap.of(), null); ReadableType[] expectedTypes = new ReadableType[] { ReadableType.Number, ReadableType.Number, ReadableType.Number, ReadableType.String, ReadableType.Boolean, ReadableType.Array, ReadableType.Map, ReadableType.Null }; for (int i = 0; i < values.size(); i++) { assertThat(values.getType(i)).isEqualTo(expectedTypes[i]); } }