Buggy code:
@ RunWith ( WildflyTestRunner . class ) @ ServerControl ( manual = true ) public class CustomVaultInCLITestCase { private static Logger LOGGER = Logger . getLogger ( CustomVaultInCLITestCase . class ) ; private static final File WORK_DIR = new File ( "cli-custom-vault-workdir" ) ; public static final File CLIENT_KEYSTORE_FILE = new File ( CustomVaultInCLITestCase . WORK_DIR , SecurityTestConstants . CLIENT_KEYSTORE ) ; public static final File CLIENT_TRUSTSTORE_FILE = new File ( CustomVaultInCLITestCase . WORK_DIR , SecurityTestConstants . CLIENT_TRUSTSTORE ) ; private static final String RIGHT_PASSWORD = SecurityTestConstants . KEYSTORE_PASSWORD ; private static final String WRONG_PASSWORD = "someRandomWrongPass" ; private static final File MODULE_FILE = new File ( CustomVaultInCLITestCase . WORK_DIR , "module.xml" ) ; private static final String JBOSS_CLI_FILE = "jboss-cli.xml" ; private static final File RIGHT_VAULT_PASSWORD_FILE = new File ( CustomVaultInCLITestCase . WORK_DIR , "right-vault-pass.xml" ) ; private static final File WRONG_VAULT_PASSWORD_FILE = new File ( CustomVaultInCLITestCase . WORK_DIR , "wrong-vault-pass.xml" ) ; private static final File NON_EXISTING_VAULT_PASSWORD_FILE = new File ( CustomVaultInCLITestCase . WORK_DIR , "non-existing-vault-pass.xml" ) ; private static String MODULE_NAME = "test.custom.vault.in.cli" ; private static String JAR_NAME = "custom-dummy-vault-module.jar" ; private static final String CONTAINER = "default-jbossas" ; private static TestModule customVaultModule ; @ Inject private static ServerController containerController ; private static TestModule picketLinkModule ; @ BeforeClass public static void prepareConfiguration ( ) throws Exception { } @ Test public void testRightVaultPassword ( ) throws Exception { } @ Test public void testWrongVaultPassword ( ) throws Exception { String cliOutput = CustomCLIExecutor . execute ( CustomVaultInCLITestCase . WRONG_VAULT_PASSWORD_FILE , ( ( READ_ATTRIBUTE_OPERATION ) + "<seq2seq4repair_space>server-state" ) ) ; assertThat ( "Password<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>wrong" , cliOutput , containsString ( ( "Password<seq2seq4repair_space>is:<seq2seq4repair_space>" + ( CustomVaultInCLITestCase . WRONG_PASSWORD ) ) ) ) ; <START_BUG> assertThat ( "CLI<seq2seq4repair_space>shouldn't<seq2seq4repair_space>successfully<seq2seq4repair_space>initialize<seq2seq4repair_space>" , cliOutput , containsString ( "CliInitializationException" ) ) ; <END_BUG> } @ Test public void testNonExistingVaultPassword ( ) throws Exception { } @ AfterClass public static void rollbackConfiguration ( ) throws Exception { } private static void createCustomVaultModule ( ) throws Exception { } private static void createCustomVaultConfiguration ( ) throws IOException { } }

Fix:
assertThat ( "CLI<seq2seq4repair_space>shouldn't<seq2seq4repair_space>successfully<seq2seq4repair_space>initialize<seq2seq4repair_space>" , cliOutput , containsString ( "Keystore<seq2seq4repair_space>was<seq2seq4repair_space>tampered<seq2seq4repair_space>with,<seq2seq4repair_space>or<seq2seq4repair_space>password<seq2seq4repair_space>was<seq2seq4repair_space>incorrect" ) ) ;