### Question:
CompatPinnedList { public synchronized boolean addPin(Uri uri, String pkg, Set<SliceSpec> specs) { Set<String> pins = getPins(uri); boolean wasNotPinned = pins.isEmpty(); pins.add(pkg); setPins(uri, pins); if (wasNotPinned) { setSpecs(uri, new ArraySet<>(specs)); } else { setSpecs(uri, mergeSpecs(getSpecs(uri), specs)); } return wasNotPinned; } CompatPinnedList(Context context, String prefsName); List<Uri> getPinnedSlices(); synchronized ArraySet<SliceSpec> getSpecs(Uri uri); synchronized boolean addPin(Uri uri, String pkg, Set<SliceSpec> specs); synchronized boolean removePin(Uri uri, String pkg);  }### Answer:
@Test public void testAddFirstPin() { assertTrue(mCompatPinnedList.addPin(Uri.parse("content: mSpecs)); }
@Test public void testAddSecondPin() { assertTrue(mCompatPinnedList.addPin(Uri.parse("content: mSpecs)); assertFalse(mCompatPinnedList.addPin(Uri.parse("content: mSpecs)); }
@Test public void testAddMultipleUris() { assertTrue(mCompatPinnedList.addPin(Uri.parse("content: mSpecs)); assertTrue(mCompatPinnedList.addPin(Uri.parse("content: mSpecs)); }