private void add(SecretStore secretStore, SecretIdentifier id, byte[] secret) {
        secretStore.persistSecret(id, secret);
        terminal.writeLine(String.format("Added '%s' to the Logstash keystore.", id.getKey()));
        SecretStoreUtil.clearBytes(secret);
    }
@Test
    public void testAdd() {
        createKeyStore();

        terminal.in.add(UUID.randomUUID().toString()); // sets the value
        String id = UUID.randomUUID().toString();
        cli.command("add", newStoreConfig.clone(), id);
        terminal.reset();

        cli.command("list", newStoreConfig);
        assertListed(id);
    }