public DataStructure createDataStructure() throws DataFormatException { Payload payload = new Payload(); SessionKey key = (SessionKey) (new SessionKeyTest()).createDataStructure(); byte data[] = "Hello, I2P".getBytes(); // This causes equals() to fail unless we override the test // to set the unencrypted data after reading. // Unencrypted data is deprecated, just use encrypted data for the test. // payload.setUnencryptedData(data); Hash hash = (Hash) (new HashTest()).createDataStructure(); Destination target = (Destination) (new DestinationTest()).createDataStructure(); payload.setEncryptedData(data); return payload; }