### Question:
WalletUpdater extends WalletManager { public static void main(String[] args) { if (args.length != 1) { exitError("You must provide an existing wallet file"); } else { new WalletUpdater().run(args[0]); } } WalletUpdater();  WalletUpdater(IODevice console); static void main(String[] args); static void main(IODevice console, String walletFileLocation);  }### Answer:
@Test public void testWalletUpdate() { when(console.readPassword(startsWith("Please enter your existing wallet file password"))) .thenReturn(WALLET_PASSWORD); when(console.readPassword(contains("password"))) .thenReturn(WALLET_PASSWORD, WALLET_PASSWORD); when(console.readLine(startsWith("Please enter a destination directory "))) .thenReturn(tempDirPath); when(console.readLine(startsWith("Would you like to delete"))) .thenReturn("N"); WalletUpdater.main(console, KeyImporterTest.class.getResource("/keyfiles/" + "UTC--2016-11-03T05-55-06.340672473Z--ef678007d18427e6022059dbc264f27507cd1ffc") .getFile()); verify(console).printf(contains("successfully created in")); }