ProtocolFactory { public static Protocol adaptiveProtocol(byte[] magicHeadBytes) { for (Protocol protocol : TYPE_PROTOCOL_MAP.values()) { if (protocol.protocolInfo().isMatchMagic(magicHeadBytes)) { return protocol; } } return null; }  static Protocol getProtocol(String alias); static Protocol getProtocol(byte code); static Byte getCodeByAlias(String protocol); static Protocol adaptiveProtocol(byte[] magicHeadBytes); static int getMaxMagicOffset();  }
@Test public void adaptiveProtocol() throws Exception { }