### Question:
SensitiveDataCodec { public static void main(String[] args) throws IOException { Function<String, char[]> readPassword; Console console = System.console(); if (console == null) { readPassword = null; } else { readPassword = console::readPassword; } String result = mainHelper(args, System.in, readPassword); if (result != null) { System.out.println(result); } } SensitiveDataCodec(); @VisibleForTesting  SensitiveDataCodec(SensitiveDataCodecHelper sensitiveDataCodecHelper); String encodeData(String readable, SecurityLevel securityLevel); String decodeData(String encrypted); static void main(String[] args);  }### Answer:
@Test public void main_badSecurityLevel_throwsException() throws Exception { try { System.setProperty("securityLevel", "foo"); thrown.expect(IOException.class); SensitiveDataCodec.main(null); } finally { System.clearProperty("securityLevel"); } }
@Test public void main_missingSecurityLevel_throwsException() throws Exception { System.clearProperty("securityLevel"); thrown.expect(IOException.class); SensitiveDataCodec.main(null); }