StandardCommandsGenerator { public String tryCatch(String tryValue, String exceptionToCatch, String ifException) { return "try{" + tryValue + "} catch (" + exceptionToCatch + ") {" + ifException + "}"; }  String ifAction(String condition, String action); String ifNotAction(String condition, String action); String assertTrue(String value); String assertFalse(String value); String assertEquals(String value, String matcher); String assertNotEquals(String value, String matcher); String verifyTrue(String value); String verifyFalse(String value); String verifyEquals(String value, String matcher); String verifyNotEquals(String value, String matcher); String tryCatch(String tryValue, String exceptionToCatch, String ifException);  }
@Test public void checkTryCatchReturnsValidCode() { assertThat(com.tryCatch(action, "Exception ex", "Exception has been thrown"), is(equalTo("try{" + action + "} catch (Exception ex) {Exception has been thrown}"))); }