void testAdapter(RecyclerView.Adapter adapter) {
        if  (adapter == null) {
            Log.e("MaterialScrollBarLib", "The adapter for your recyclerView has not been set; " +
                    "skipping indicator layout.");
            return;
        }
        if(!adapterClass.isInstance(adapter)) {
            throw new IllegalArgumentException(
                    "In order to add this indicator, the adapter for your recyclerView, "
                            + adapter.getClass().getName()
                            + ", MUST implement " + Utils.getGenericName(this) + ".");
        }
    }
This method tests the adapter to make sure that it implements the needed interface.

@param adapter The adapter of the attached {@link RecyclerView}.
lib/src/main/java/com/turingtechnologies/materialscrollbar/Indicator.java