### Question:
StartupMessage extends PGMessage { public static StartupMessage loadFromVirtualPacket(byte[] packet) { return _loadFromPacket(packet, true); } StartupMessage(String user, String database);  StartupMessage(String user); Map<String, String> getArgs(); void addArgs(String argName, String argValue); void addArgsIfAbsent(String argName, String argValue); String getUser(); String getDatabase(); void setProtocolVersionNum(int protocolVersionNum); static StartupMessage loadFromPacket(byte[] packet); static StartupMessage loadFromVirtualPacket(byte[] packet); @Override String toString(); static final int PROTOCOL_VERSION_NUM; }### Answer:
@Test public void testLoadFromVirtualPacket() { StartupMessage startupMessage = StartupMessage.loadFromVirtualPacket(virtualWithArgsPacket); String expectedUser = "root"; assertEquals(startupMessage.getUser(), expectedUser); String expectedDatabase = "pgtestdb"; assertEquals(startupMessage.getDatabase(), expectedDatabase); Map<String, String> expectArgs = new LinkedHashMap<>(); expectArgs.put("application_name", "Postico 1.0.10"); expectArgs.put("client_encoding", "UNICODE"); assertEquals(startupMessage.getArgs(), expectArgs); assertEquals(startupMessage.getTypeByte(), PGFlags.C_STARTUP_MESSAGE); }