Repository: open-feature/java-sdk (java)

Issue:
Implement equals for the ImmutableMetadata object
# Context
When working with an `ImmutableMetadata` it is hard to write tests because we cannot compare a `FlagEvaluationDetails` anymore.

```java
String flagKey = "bool_targeting_match";
FlagEvaluationDetails expected = FlagEvaluationDetails.builder()
        .reason(Reason.ERROR.toString())
        .value(false)
        .errorCode(ErrorCode.GENERAL)
        .errorMessage("impossible to contact GO Feature Flag relay proxy instance")
        .flagMetadata(ImmutableMetadata.builder().build())
        .build();
FlagEvaluationDetails<Boolean> got = goffClient.getBooleanDetails(flagKey, false, defaultEvaluationContext);
assertEquals(expected, got);
```

The JUNIT method `assertEquals` is comparing the reference of the object.

# Expected behavior
We should be able to use `assertEquals` for the whole `FlagEvaluationDetails` object.
For this we should probably implement the `equals()` method in the `ImmutableMetadata` object.

Pull request:
fix:  Implement equals for the ImmutableMetadata object
## This PR
- Implement the `equals` method to be able to compare 2 `FlagEvaluationDetails`.

### Related Issues
Fixes #511

Patch:
diff --git a/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java b/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java
index 1bc130b..75f8984 100644
--- a/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java
+++ b/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java
@@ -1,5 +1,6 @@
 package dev.openfeature.sdk;
 
+import lombok.EqualsAndHashCode;
 import lombok.extern.slf4j.Slf4j;
 
 import java.util.HashMap;
@@ -10,6 +11,7 @@ import java.util.Map;
  * through builder and accessors.
  */
 @Slf4j
+@EqualsAndHashCode
 public class ImmutableMetadata {
     private final Map<String, Object> metadata;
 


Test patch:
diff --git a/src/test/java/dev/openfeature/sdk/FlagEvaluationDetailsTest.java b/src/test/java/dev/openfeature/sdk/FlagEvaluationDetailsTest.java
index 9a6df1a..dfa7727 100644
--- a/src/test/java/dev/openfeature/sdk/FlagEvaluationDetailsTest.java
+++ b/src/test/java/dev/openfeature/sdk/FlagEvaluationDetailsTest.java
@@ -45,4 +45,26 @@ class FlagEvaluationDetailsTest {
         assertEquals(errorMessage, details.getErrorMessage());
         assertEquals(metadata, details.getFlagMetadata());
     }
+
+    @Test
+    @DisplayName("should be able to compare 2 FlagEvaluationDetails")
+    public void compareFlagEvaluationDetails(){
+        FlagEvaluationDetails fed1 = FlagEvaluationDetails.builder()
+                .reason(Reason.ERROR.toString())
+                .value(false)
+                .errorCode(ErrorCode.GENERAL)
+                .errorMessage("error XXX")
+                .flagMetadata(ImmutableMetadata.builder().addString("metadata","1").build())
+                .build();
+
+        FlagEvaluationDetails fed2 = FlagEvaluationDetails.builder()
+                .reason(Reason.ERROR.toString())
+                .value(false)
+                .errorCode(ErrorCode.GENERAL)
+                .errorMessage("error XXX")
+                .flagMetadata(ImmutableMetadata.builder().addString("metadata","1").build())
+                .build();
+
+        assertEquals(fed1,fed2);
+    }
 }