@Test public void testDumpThrowsNullPointerException() throws Throwable { try { new KeySerialNumber().dump(null, "testKeySerialNumberIndent"); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cannot invoke \"java.io.PrintStream.println(String)\" because \"p\" is null", ex.getMessage(), "ex.getMessage()"); } } }
public void dump (PrintStream p, String indent) { String inner = indent + " "; p.println(indent + "<key-serial-number>"); p.println(inner + "<base-key-id>" + getBaseKeyID() + "</base-key-id>"); p.println(inner + "<device-id>" + getDeviceID() + "</device-id>"); p.println(inner + "<transaction-counter>" + getTransactionCounter() + "</transaction-counter"); p.println(indent + "</key-serial-number>"); }
KeySerialNumber implements Serializable, Loggeable { public void dump (PrintStream p, String indent) { String inner = indent + " "; p.println(indent + "<key-serial-number>"); p.println(inner + "<base-key-id>" + getBaseKeyID() + "</base-key-id>"); p.println(inner + "<device-id>" + getDeviceID() + "</device-id>"); p.println(inner + "<transaction-counter>" + getTransactionCounter() + "</transaction-counter"); p.println(indent + "</key-serial-number>"); } }
KeySerialNumber implements Serializable, Loggeable { public void dump (PrintStream p, String indent) { String inner = indent + " "; p.println(indent + "<key-serial-number>"); p.println(inner + "<base-key-id>" + getBaseKeyID() + "</base-key-id>"); p.println(inner + "<device-id>" + getDeviceID() + "</device-id>"); p.println(inner + "<transaction-counter>" + getTransactionCounter() + "</transaction-counter"); p.println(indent + "</key-serial-number>"); } KeySerialNumber();  KeySerialNumber(String baseKeyID, String deviceID, String transactionCounter); }
KeySerialNumber implements Serializable, Loggeable { public void dump (PrintStream p, String indent) { String inner = indent + " "; p.println(indent + "<key-serial-number>"); p.println(inner + "<base-key-id>" + getBaseKeyID() + "</base-key-id>"); p.println(inner + "<device-id>" + getDeviceID() + "</device-id>"); p.println(inner + "<transaction-counter>" + getTransactionCounter() + "</transaction-counter"); p.println(indent + "</key-serial-number>"); } KeySerialNumber();  KeySerialNumber(String baseKeyID, String deviceID, String transactionCounter); void setBaseKeyID(String baseKeyID); String getBaseKeyID(); void setDeviceID(String deviceID); String getDeviceID(); void setTransactionCounter(String transactionCounter); String getTransactionCounter(); void dump(PrintStream p, String indent); }
KeySerialNumber implements Serializable, Loggeable { public void dump (PrintStream p, String indent) { String inner = indent + " "; p.println(indent + "<key-serial-number>"); p.println(inner + "<base-key-id>" + getBaseKeyID() + "</base-key-id>"); p.println(inner + "<device-id>" + getDeviceID() + "</device-id>"); p.println(inner + "<transaction-counter>" + getTransactionCounter() + "</transaction-counter"); p.println(indent + "</key-serial-number>"); } KeySerialNumber();  KeySerialNumber(String baseKeyID, String deviceID, String transactionCounter); void setBaseKeyID(String baseKeyID); String getBaseKeyID(); void setDeviceID(String deviceID); String getDeviceID(); void setTransactionCounter(String transactionCounter); String getTransactionCounter(); void dump(PrintStream p, String indent);  }