FabSetter extends BaseSetter { public static boolean isFab(View view) { if (view == null) { return false; } ReflectiveCache reflectiveCache = ReflectiveCache.getInstance(); return view.getClass().getCanonicalName().startsWith(CLASS_NAME) && reflectiveCache.hasMethod(view.getClass(), METHOD_NAME, ColorStateList.class); } FabSetter(View view, Filter filter); static boolean isFab(View view); @Override void onSetColour(@ColorInt int colour);  }
@Test public void givenAFabThenIsFabReturnsTrue() { assertThat(FabSetter.isFab(floatingActionButton)).isTrue(); }
@Test public void givenAVanillaViewThenIsFabReturnsTrue() { assertThat(FabSetter.isFab(vanillaView)).isFalse(); }