### Question:
ViewAddOnInjector implements ViewAddOns { @SuppressWarnings("unchecked") public void injectIfRequired(Object viewAttribute, Object view) { if (viewAttribute instanceof ViewAddOnAware) { ViewAddOn viewAddOn = getMostSuitable(view); ViewAddOnAware<ViewAddOn> viewAddOnAwareAttribute = (ViewAddOnAware<ViewAddOn>) viewAttribute; try { viewAddOnAwareAttribute.setViewAddOn(viewAddOn); } catch (ClassCastException e) { String message = MessageFormat.format("Is ''{0}'' a view attribute of view ''{1}''; " + "or did you forget to register the ViewAddOn by org.robobinding.binder.BinderFactoryBuilder? " + "The closest ViewAddOn ''{2}'' we found does not match the view attribute.", viewAttribute.getClass().getName(), view.getClass().getName(), viewAddOn.getClass().getName()); throw new RuntimeException(message, e); } } } ViewAddOnInjector(ViewAddOns viewAddOns); @SuppressWarnings("unchecked") void injectIfRequired(Object viewAttribute, Object view); @Override ViewAddOn getMostSuitable(Object view);  }### Answer:
@Test public void whenInjectNonViewListenersAwareAttribute_thenSafelyIgnored() { ViewAddOnInjector injector = new ViewAddOnInjector(null); injector.injectIfRequired(new NonViewListenersAwareAttribute(), view); }