### Question:
AuthenticationOk extends Authentication { public static AuthenticationOk loadFromPacket(byte[] packet) { PGProto proto = new PGProto(packet, 5); int authType = proto.readInt32(); if (authType != AuthType.AuthenticationOk.getAuthTypeNum()) { throw new IllegalArgumentException( "illegal auth type byte " + authType + " in packet " + Arrays.toString(packet)); } return INSTANCE; } AuthenticationOk(); static AuthenticationOk loadFromPacket(byte[] packet); @Override String toString(); static final AuthenticationOk INSTANCE; }### Answer:
@Test public void testLoadFromPacket() { AuthenticationOk ok = AuthenticationOk.loadFromPacket(packet); assertEquals(ok.getTypeByte(), PGFlags.AUTHENTICATION_OK); }