You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several of the core data classes in WireMock are now immutable, and can only be transformed via their respective builder classes.
61
+
This decision was made to reduce the likelihood of bugs due to reliance on in-place mutation of objects,
62
+
especially objects within in-memory stores, and to increase code clarity.
63
+
64
+
#### Usage
65
+
66
+
Previously, a `StubMapping` instance's request pattern could be mutated via the `setRequest` method on the `StubMapping` class, like so:
67
+
```java
68
+
stubMapping.setRequest(newRequestPattern);
69
+
```
70
+
Now, the `transform` method on the `StubMapping` class can be used to copy the existing instance and return a new instance with an updated request pattern, like so:
0 commit comments