### Question:
ConfigurationImpl implements Configuration { private void register(Object provider, int bindingPriority, Class<?>... contracts) { register(provider, initContractsMap(bindingPriority, contracts)); } ConfigurationImpl(RuntimeType rt);  ConfigurationImpl(Configuration parent); @Override Set<Class<?>> getClasses(); @Override Map<Class<?>, Integer> getContracts(Class<?> cls); @Override Set<Object> getInstances(); @Override Map<String, Object> getProperties(); @Override Object getProperty(String name); @Override Collection<String> getPropertyNames(); @Override RuntimeType getRuntimeType(); @Override boolean isEnabled(Feature f); @Override boolean isEnabled(Class<? extends Feature> f); @Override boolean isRegistered(Object obj); @Override boolean isRegistered(Class<?> cls); void setProperty(String name, Object value); void setFeature(Feature f, boolean enabled); boolean register(Object provider, Map<Class<?>, Integer> contracts); static Map<Class<?>, Integer> initContractsMap(int bindingPriority, Class<?>... contracts); static Object createProvider(Class<?> cls);  }### Answer:
@Test public void testInvalidContract() { TestHandler handler = new TestHandler(); LogUtils.getL7dLogger(ConfigurationImpl.class).addHandler(handler); ConfigurationImpl c = new ConfigurationImpl(RuntimeType.SERVER); ContainerResponseFilter filter = new ContainerResponseFilterImpl(); assertFalse(c.register(filter, Collections.<Class<?>, Integer>singletonMap(MessageBodyReader.class, 1000))); for (String message : handler.messages) { if (message.startsWith("WARN") && message.contains("does not implement specified contract")) { return; } } fail("did not log expected message"); }