### Question:
DoubleConfigurationResolver { public Object resolveSpyConfiguration(String doubleName, @Nullable Field field) { return resolveDoubleConfiguration( doubleName, field, configurationParser::parseSpyConfiguration); } DoubleConfigurationResolver(Class<? extends Annotation> configurationAnnotation, DoubleConfigurationParser<?, Annotation> configurationParser); Object resolveMockConfiguration(String doubleName, @Nullable Field field); Object resolveSpyConfiguration(String doubleName, @Nullable Field field);  }### Answer:
@Test public void should_resolve_spy_configuration() { final Object config = new Object(); Mockito .when(configurationParser.parseSpyConfiguration(doubleName, configAnnotationInstance())) .thenReturn(config); assertEquals( config, resolveSpyConfiguration(doubleField())); }
@Test public void should_return_spy_configuration_from_not_annotated_field() { resolveSpyConfiguration(otherField()); Mockito .verify(configurationParser) .parseSpyConfiguration(doubleName, MISSING_CONFIGURATION_ANNOTATION); }
@Test public void should_resolve_class_level_spy_configuration() { configurationResolver.resolveSpyConfiguration(doubleName, NO_FIELD); Mockito .verify(configurationParser) .parseSpyConfiguration(doubleName, MISSING_CONFIGURATION_ANNOTATION); }