Exception getTechnicalFailure()

TODO: this is just a generated example

javadoc usage tests

Added in version 10.3.0

Can get technical failure

Exception exception = new Exception();

TechnicalFailure<Happy, Sad> technicalFailure = TechnicalFailure.technicalFailure(exception);

assertThat(technicalFailure.getTechnicalFailure()).isEqualTo(exception);

Attempting to get technical failure that is not there throws an illegal state exception

HappyPath<Happy, Sad> happyPath = HappyPath.happyPath(new Happy("name"));

assertThatThrownBy(happyPath::getTechnicalFailure)
    .hasMessage("Not present. This is: 'Happy: name'.")
    .isInstanceOf(IllegalStateException.class);