### Question:
ChronicleAuditLoggerConfig { public FieldSelector getFields() { return fieldSelector; } ChronicleAuditLoggerConfig(Map<String, String> parameters); FieldSelector getFields();  }### Answer:
@Test public void testDefaultFieldsConfig() { Map<String, String> options = ImmutableMap.of("log_dir", "/tmp"); ChronicleAuditLoggerConfig config = new ChronicleAuditLoggerConfig(options); FieldSelector fields = config.getFields(); assertThat(fields.isSelected(Field.CLIENT_IP)).isTrue(); assertThat(fields.isSelected(Field.CLIENT_PORT)).isTrue(); assertThat(fields.isSelected(Field.COORDINATOR_IP)).isTrue(); assertThat(fields.isSelected(Field.USER)).isTrue(); assertThat(fields.isSelected(Field.BATCH_ID)).isTrue(); assertThat(fields.isSelected(Field.STATUS)).isTrue(); assertThat(fields.isSelected(Field.OPERATION)).isTrue(); assertThat(fields.isSelected(Field.OPERATION_NAKED)).isFalse(); assertThat(fields.isSelected(Field.TIMESTAMP)).isTrue(); }
@Test public void testCustomFieldsConfig() { Map<String, String> options = ImmutableMap.of("log_dir", "/tmp", "fields", ", CLIENT_IP, , USER, STATUS,"); ChronicleAuditLoggerConfig config = new ChronicleAuditLoggerConfig(options); FieldSelector fields = config.getFields(); assertThat(fields.isSelected(Field.CLIENT_IP)).isTrue(); assertThat(fields.isSelected(Field.CLIENT_PORT)).isFalse(); assertThat(fields.isSelected(Field.COORDINATOR_IP)).isFalse(); assertThat(fields.isSelected(Field.USER)).isTrue(); assertThat(fields.isSelected(Field.BATCH_ID)).isFalse(); assertThat(fields.isSelected(Field.STATUS)).isTrue(); assertThat(fields.isSelected(Field.OPERATION)).isFalse(); assertThat(fields.isSelected(Field.OPERATION_NAKED)).isFalse(); assertThat(fields.isSelected(Field.TIMESTAMP)).isFalse(); }