### Question:
BaseInsightPoint implements InsightPoint { @Override public boolean filterLog(Map<String, String> filters, String logLine) { if (filters == null) { return true; } boolean result = true; for (Entry<String, String> entry : filters.entrySet()) { if (!logLine.matches( String.format(".*\\[%s=%s\\].*", entry.getKey(), entry.getValue()))) { return false; } } return true; }  @Override List<MetricGroupDisplay> getMetrics(Map<String, String> filters); @Override List<Class> getConfigurationClasses(); @Override List<LoggerSource> getRelatedLoggers(boolean verbose,
      Map<String, String> filters); ScmClient createScmClient(OzoneConfiguration ozoneConf); Level defaultLevel(boolean verbose); void addProtocolMessageMetrics(
      List<MetricGroupDisplay> metrics,
      String prefix,
      Component.Type type,
      Object[] types
  ); void addProtocolMessageMetrics(
      List<MetricGroupDisplay> metrics,
      String prefix,
      Component component,
      Object[] types
  ); void addRpcMetrics(List<MetricGroupDisplay> metrics,
      Component.Type component,
      Map<String, String> filter); @Override boolean filterLog(Map<String, String> filters, String logLine);  }### Answer:
@Test public void filterLog() { BaseInsightPoint insightPoint = new BaseInsightPoint() { @Override public String getDescription() { return "test"; } }; Map<String, String> filters = new HashMap<>(); filters.put("datanode", "123"); Assert.assertTrue(insightPoint .filterLog(filters, "This a log specific to [datanode=123]")); Assert.assertFalse(insightPoint .filterLog(filters, "This a log specific to [datanode=234]")); Assert.assertTrue(insightPoint .filterLog(new HashMap<>(), "This a log specific to [datanode=234]")); filters.clear(); filters.put("datanode", "123"); filters.put("pipeline", "abcd"); Assert.assertFalse(insightPoint .filterLog(filters, "This a log specific to [datanode=123]")); Assert.assertTrue(insightPoint .filterLog(filters, "This a log specific to [datanode=123] [pipeline=abcd]")); Assert.assertFalse(insightPoint .filterLog(filters, "This a log specific to [datanode=456] [pipeline=abcd]")); }