AppContext implements Serializable { public void setPrivateKey(PrivateKey privateKey) { Util.check(privateKey!=null, "privateKey!=null"); this.privateKey = privateKey; }  String getNodeName(); void setNodeName(String nodeName); Integer getPort(); void setPort(Integer port); String getMasterPeerIpAddress(); void setMasterPeerIpAddress(String masterPeerIpAddress); Integer getMasterPeerPort(); void setMasterPeerPort(Integer masterPeerPort); String getStorageBasePath(); void setStorageBasePath(String storageBasePath); BootstrapType getBootstrapType(); void setBootstrapType(BootstrapType bootstrapType); String getStrAddressMint(); void setStrAddressMint(String strAddressMint); BigInteger getValueMint(); void setPrivateKey(PrivateKey privateKey); PrivateKey getPrivateKey(); List<String> getListNTPServers();  }
@Test(expected = IllegalArgumentException.class) public void testSetPrivateKeyWithNullValueShouldThrowException(){ context.setPrivateKey(null); }
@Test public void testSetPrivateKey(){ PrivateKey privateKey = new PrivateKey(); context.setPrivateKey(privateKey); Assert.assertEquals(privateKey, context.getPrivateKey()); }