Repository: assertj/assertj

Problem statement:
AbstractOptionalAssert#get() is not correctly proxied with SoftAssertions
#### Summary
AbstractOptionalAssert#get() is not listed under `METHODS_CHANGING_THE_OBJECT_UNDER_TEST` of `SoftProxies`.

#### Example

```java
SoftAssertions softly = new SoftAssertions();
Optional<String> optional = Optional.of("Yoda");

softly.assertThat(optional)
      .get()
      .isEqualTo("Luke"); // fails here

assertThat(softly.errorsCollected()).hasSize(1);
```



Hints:
Good catch!

Patch:
diff --git a/src/main/java/org/assertj/core/api/SoftProxies.java b/src/main/java/org/assertj/core/api/SoftProxies.java
--- a/src/main/java/org/assertj/core/api/SoftProxies.java
+++ b/src/main/java/org/assertj/core/api/SoftProxies.java
@@ -54,6 +54,7 @@ class SoftProxies {
                                                                                                                       .or(named("extractingByKey"))
                                                                                                                       .or(named("extractingByKeys"))
                                                                                                                       .or(named("extractingFromEntries"))
+                                                                                                                      .or(named("get"))
                                                                                                                       .or(named("asInstanceOf"));
 
   private static final Junction<MethodDescription> METHODS_NOT_TO_PROXY = methodsNamed("as").or(named("clone"))


Test patch:
diff --git a/src/test/java/org/assertj/core/api/SoftAssertionsTest.java b/src/test/java/org/assertj/core/api/SoftAssertionsTest.java
--- a/src/test/java/org/assertj/core/api/SoftAssertionsTest.java
+++ b/src/test/java/org/assertj/core/api/SoftAssertionsTest.java
@@ -823,24 +823,18 @@ public void should_work_with_predicate() {
   }
 
   @Test
-  public void should_work_with_optional() {
-    // GIVEN
-    Optional<String> optional = Optional.of("Gandalf");
-    // WHEN
-    softly.assertThat(optional).contains("Gandalf");
-    // THEN
-    softly.assertAll();
-  }
-
-  @Test
-  public void should_work_with_optional_chained_with_map() {
+  void should_work_with_optional() {
     // GIVEN
     Optional<String> optional = Optional.of("Gandalf");
     // WHEN
     softly.assertThat(optional)
-          .contains("Gandalf")
+          .contains("Gandalf");
+    softly.assertThat(optional)
           .map(String::length)
           .contains(7);
+    softly.assertThat(optional)
+          .get()
+          .isEqualTo("Gandalf");
     // THEN
     softly.assertAll();
   }
@@ -1810,14 +1804,21 @@ public void optional_soft_assertions_should_report_errors_on_methods_that_switch
           .map(String::length)
           .hasValue(4)
           .hasValue(888); // fail
+    softly.assertThat(optional)
+          .as("get()")
+          .overridingErrorMessage("error message")
+          .get()
+          .isEqualTo("Yoda")
+          .isEqualTo("Luke"); // fail
     // THEN
     List<Throwable> errorsCollected = softly.errorsCollected();
-    assertThat(errorsCollected).hasSize(3);
+    assertThat(errorsCollected).hasSize(4);
     assertThat(errorsCollected.get(0)).hasMessage("[map(String::length)] error message");
     assertThat(errorsCollected.get(1)).hasMessageContaining("flatMap(upperCaseOptional)")
                                       .hasMessageContaining("yoda");
     assertThat(errorsCollected.get(2)).hasMessageContaining("map(String::length) after flatMap(upperCaseOptional)")
                                       .hasMessageContaining("888");
+    assertThat(errorsCollected.get(3)).hasMessage("[get()] error message");
   }
 
   @Test