BasicPaloAltoFirewallParser extends BasicParser { @Override public void configure(Map<String, Object> parserConfig) { setReadCharset(parserConfig); }  @Override void configure(Map<String, Object> parserConfig); @Override void init(); @Override @SuppressWarnings({"unchecked", "unused"}) List<JSONObject> parse(byte[] msg); static final String PaloAltoDomain; static final String ReceiveTime; static final String SerialNum; static final String Type; static final String ThreatContentType; static final String ConfigVersion; static final String GenerateTime; static final String SourceAddress; static final String DestinationAddress; static final String NATSourceIP; static final String NATDestinationIP; static final String Rule; static final String SourceUser; static final String DestinationUser; static final String Application; static final String VirtualSystem; static final String SourceZone; static final String DestinationZone; static final String InboundInterface; static final String OutboundInterface; static final String LogAction; static final String TimeLogged; static final String SessionID; static final String RepeatCount; static final String SourcePort; static final String DestinationPort; static final String NATSourcePort; static final String NATDestinationPort; static final String Flags; static final String IPProtocol; static final String Action; static final String Seqno; static final String ActionFlags; static final String Category; static final String DGH1; static final String DGH2; static final String DGH3; static final String DGH4; static final String VSYSName; static final String DeviceName; static final String ActionSource; static final String ParserVersion; static final String Tokens; static final String SourceVmUuid; static final String DestinationVmUuid; static final String TunnelId; static final String MonitorTag; static final String ParentSessionId; static final String ParentSessionStartTime; static final String TunnelType; static final String EventId; static final String Object; static final String Module; static final String Description; static final String Command; static final String Admin; static final String Client; static final String Result; static final String ConfigurationPath; static final String BeforeChangeDetail; static final String AfterChangeDetail; static final String URL; static final String HOST; static final String ThreatID; static final String Severity; static final String Direction; static final String SourceLocation; static final String DestinationLocation; static final String ContentType; static final String PCAPID; static final String WFFileDigest; static final String WFCloud; static final String UserAgent; static final String WFFileType; static final String XForwardedFor; static final String Referer; static final String WFSender; static final String WFSubject; static final String WFRecipient; static final String WFReportID; static final String URLIndex; static final String HTTPMethod; static final String ThreatCategory; static final String ContentVersion; static final String Bytes; static final String BytesSent; static final String BytesReceived; static final String Packets; static final String StartTime; static final String ElapsedTimeInSec; static final String PktsSent; static final String PktsReceived; static final String EndReason; }
@Test public void getsReadCharsetFromConfig() { Map<String, Object> config = new HashMap<>(); config.put(MessageParser.READ_CHARSET, StandardCharsets.UTF_16.toString()); parser.configure(config); assertThat(parser.getReadCharset(), equalTo(StandardCharsets.UTF_16)); }
@Test public void getsReadCharsetFromDefault() { Map<String, Object> config = new HashMap<>(); parser.configure(config); assertThat(parser.getReadCharset(), equalTo(StandardCharsets.UTF_8)); }