AdapterHelper { static boolean isAssignableFrom(Class<?>[] parameterTypes, Class<?>... classes) { if (parameterTypes == null || classes == null || parameterTypes.length != classes.length) { return false; } for (int i = 0; i < parameterTypes.length; i++) { if (!classes[i].isAssignableFrom(parameterTypes[i])) { return false; } } return true; } AdapterHelper(T... objects);   AdapterHelper(List<T> objects);   AdapterHelper(int layoutResId,
                  Class<? extends EfficientViewHolder<? extends T>> viewHolderClass, T... objects);   AdapterHelper(int layoutResId,
                  Class<? extends EfficientViewHolder<? extends T>> viewHolderClass,
                  List<T> objects); void onBindViewHolder(EfficientViewHolder<T> viewHolder, int position,
                                 EfficientAdapter<T> adapter); EfficientAdapter.OnItemClickListener<T> getOnItemClickListener(); EfficientAdapter.OnItemLongClickListener<T> getOnItemLongClickListener();  }
@Test public void testIsAssignableFrom_Correct() throws Exception { Class<?>[] params = new Class[]{Vehicle.class, Car.class, Dog.class}; assertTrue(AdapterHelper.isAssignableFrom(params, Vehicle.class, Car.class, Animal.class)); }
@Test public void testIsAssignableFrom_WrongParameterLength() throws Exception { Class<?>[] params = new Class[]{Vehicle.class, Car.class, Animal.class}; assertFalse(AdapterHelper.isAssignableFrom(params, Vehicle.class)); }
@Test public void testIsAssignableFrom_Incorrect() throws Exception { Class<?>[] params = new Class[]{Vehicle.class, Car.class, Animal.class}; assertFalse(AdapterHelper.isAssignableFrom(params, Vehicle.class, Car.class, Car.class)); }