I'm not a Java, Cucumber, Selenium athlete, but I've managed to cobble together some robust Cucumber tests that work. Each test tears down any data created to support it.
Problem is the environment the tests run in is less than robust and (as the tests rely on common data) when they fail the data can be left in an indeterminate state.
I don't really understand exception handlers, but want to write some code that will run when a test fails that checks the state of data and resets it so that a subsequent test will run and not fail due to a previous failure.