@Override
    public String nameForField(MapperConfig<?> config,
                               AnnotatedField field,
                               String defaultName) {
        if (field == null) {
            return defaultName;
        } else if (field.getDeclaringClass().isAnnotationPresent(JsonSnakeCase.class)) {
            return snakeCase.nameForField(config, field, defaultName);
        }

        return super.nameForField(config, field, defaultName);
    }
@Test
    void nameForFieldWorksWithNullField() {
        final MapperConfig<?> mapperConfig = mock(MapperConfig.class);
        final String name = strategy.nameForField(mapperConfig, null, "defaultName");
        assertThat(name).isEqualTo("defaultName");
    }