once

Creates a StubConfiguration that is removed after its first match.

Java-friendly alternative to StubConfiguration(eventuallyRemove = true):

mokksy.get(StubConfiguration.once("my-stub"), "/path")
.respondsWith("one-time response");

Return

A new StubConfiguration with eventuallyRemove set to true.

Parameters

name

Optional human-readable name for log and error output.