### Question:
Data { @VisibleForTesting public int size() { return mValues.size(); } Data();   Data(Map<String, ?> values); boolean getBoolean(String key, boolean defaultValue); boolean[] getBooleanArray(String key); int getInt(String key, int defaultValue); int[] getIntArray(String key); long getLong(String key, long defaultValue); long[] getLongArray(String key); float getFloat(String key, float defaultValue); float[] getFloatArray(String key); double getDouble(String key, double defaultValue); double[] getDoubleArray(String key); String getString(String key, String defaultValue); String[] getStringArray(String key); Map<String, Object> getKeyValueMap(); @VisibleForTesting int size(); @TypeConverter static byte[] toByteArray(Data data); @TypeConverter static Data fromByteArray(byte[] bytes); @Override boolean equals(Object o); @Override int hashCode(); static final Data EMPTY; static final int MAX_DATA_BYTES; }### Answer:
@Test public void testSize_noArguments() { Data data = new Data.Builder().build(); assertThat(data.size(), is(0)); }
@Test public void testSize_hasArguments() { Data data = new Data.Builder().putBoolean(KEY1, true).build(); assertThat(data.size(), is(1)); }