@Test(expected = IllegalArgumentException.class) public void getXRangeConverter_NOT_FOUND() { when(xRangeConverter1.isApplicable(any())).thenReturn(false); when(xRangeConverter2.isApplicable(any())).thenReturn(false); xRangeConverterManager.getXRangeConverter(XDateRange.class); }
public XRangeConverter getXRangeConverter(Class<? extends XRange> clazz) { Preconditions.checkNotNull(clazz); for (XRangeConverter xRangeConverter : xRangeConverters) { if (xRangeConverter.isApplicable(clazz)) { return xRangeConverter; } } throw new IllegalArgumentException("No XRangeConverter applicable for " + clazz + " found."); }
XRangeConverterManager { public XRangeConverter getXRangeConverter(Class<? extends XRange> clazz) { Preconditions.checkNotNull(clazz); for (XRangeConverter xRangeConverter : xRangeConverters) { if (xRangeConverter.isApplicable(clazz)) { return xRangeConverter; } } throw new IllegalArgumentException("No XRangeConverter applicable for " + clazz + " found."); } }
XRangeConverterManager { public XRangeConverter getXRangeConverter(Class<? extends XRange> clazz) { Preconditions.checkNotNull(clazz); for (XRangeConverter xRangeConverter : xRangeConverters) { if (xRangeConverter.isApplicable(clazz)) { return xRangeConverter; } } throw new IllegalArgumentException("No XRangeConverter applicable for " + clazz + " found."); }  }
XRangeConverterManager { public XRangeConverter getXRangeConverter(Class<? extends XRange> clazz) { Preconditions.checkNotNull(clazz); for (XRangeConverter xRangeConverter : xRangeConverters) { if (xRangeConverter.isApplicable(clazz)) { return xRangeConverter; } } throw new IllegalArgumentException("No XRangeConverter applicable for " + clazz + " found."); }  XRangeConverter getXRangeConverter(Class<? extends XRange> clazz); @Autowired void setxRangeConverters(List<XRangeConverter> xRangeConverters); }
XRangeConverterManager { public XRangeConverter getXRangeConverter(Class<? extends XRange> clazz) { Preconditions.checkNotNull(clazz); for (XRangeConverter xRangeConverter : xRangeConverters) { if (xRangeConverter.isApplicable(clazz)) { return xRangeConverter; } } throw new IllegalArgumentException("No XRangeConverter applicable for " + clazz + " found."); }  XRangeConverter getXRangeConverter(Class<? extends XRange> clazz); @Autowired void setxRangeConverters(List<XRangeConverter> xRangeConverters);  }