@Override
  public Map<String, Object> encode(Object object) throws EncodeException {
    if (object == null) {
      return Collections.emptyMap();
    }
    ObjectParamMetadata metadata =
        classToMetadata.computeIfAbsent(object.getClass(), ObjectParamMetadata::parseObjectType);

    return metadata.objectFields.stream()
        .map(field -> this.FieldValuePair(object, field))
        .filter(fieldObjectPair -> fieldObjectPair.right.isPresent())
        .collect(Collectors.toMap(this::fieldName,
            fieldObjectPair -> fieldObjectPair.right.get()));

  }
@Test
  void defaultEncoder_acceptNullValue() {
    assertThat(encoder.encode(null)).as("Empty map should be returned")
        .isEqualTo(Collections.EMPTY_MAP);
  }