CarpaccioManager implements MappingManager.MappingManagerCallback { public Object registerAdapter(String mapName, Object adapter) { if (adapter instanceof RecyclerView.Adapter || adapter instanceof BaseAdapter) { if (!registerAdapters.containsKey(mapName)) { this.registerAdapters.put(mapName, adapter); return adapter; } else { return this.registerAdapters.get(mapName); } } return null; } CarpaccioManager(MappingManager mappingManager); void addView(View view); boolean isCarpaccioControlledView(View view); void registerController(Object controller); void registerControllers(Context context, String registerString); void executeActionsOnViews(); void executeActionsOnViews(List<View> views, Object mappedObject); void executeActionsOnView(View view); void executeActionsOnView(View view, Object mappedObject); void callActionOnView(CarpaccioAction action, View view); void mapObject(String name, Object object); Object getMappedObject(String name); void mapList(String mappedName, List list); void appendList(String mappedName, List list); List getMappedList(String name); Object registerAdapter(String mapName, Object adapter); T getAdapter(String mappedName); void addChildViews(View view); Object bindView(View view, String mapName, int position); Object bindView(View view, String mapName); void notifyAdapterDataSetChanded(Object adapter); void findCarpaccioControlledViews(View view); void findCarpaccioControlledViews(View view, List<View> listAddTo);  }
@Test public void testRegisterAdapter() throws Exception { RecyclerView.Adapter adapter = mock(RecyclerView.Adapter.class); carpaccioManager.registerAdapter("users", adapter); assertEquals(adapter, carpaccioManager.registerAdapters.get("users")); }