### Question:
ConfigFileUpdaterWriter { public void updateAndWriteToCLI(List<KeyData> newKeys, KeyVaultConfig keyVaultConfig, Config config) { LOGGER.info("Writing updated config to system out"); update(newKeys, keyVaultConfig, config); JaxbUtil.marshal(config, SystemAdapter.INSTANCE.out()); LOGGER.info("Updated config written to system out"); } ConfigFileUpdaterWriter(FilesDelegate filesDelegate); void updateAndWrite(
        List<KeyData> newKeys, KeyVaultConfig keyVaultConfig, Config config, Path configDest); void updateAndWriteToCLI(List<KeyData> newKeys, KeyVaultConfig keyVaultConfig, Config config);  }### Answer:
@Test public void updateAndWriteToCLI() { final String pub1 = "BULeR8JyUWhiuuCMU/HLA0Q5pzkYT+cHII3ZKBey3Bo="; final String priv1 = "Wl+xSyXVuuqzpvznOS7dOobhcn4C5auxkFRi7yLtgtA="; final String pub2 = "eKSr3gAw5zPubOK96dw2qkZZmIT2HUBf8Zv001ubBC0="; final String priv2 = "9YabvoCKGD1sUkUgHak4XJzbtgdwEsF/jiarLoTHeR0="; final KeyData key1 = new KeyData(); key1.setPublicKey(pub1); key1.setPrivateKey(priv1); final KeyData key2 = new KeyData(); key2.setPublicKey(pub2); key2.setPrivateKey(priv2); final List<KeyData> newKeys = Collections.singletonList(key1); final List<KeyData> existingKeys = new ArrayList<>(Collections.singletonList(key2)); final Config config = JaxbUtil.unmarshal(getClass().getResourceAsStream("/sample_full.json"), Config.class); config.getKeys().setKeyData(existingKeys); config.getKeys().setPasswords(null); writer.updateAndWriteToCLI(newKeys, null, config); }