@Test
public void testPrivilegeNotEndingWithValidAction() {

  KafkaPrivilegeValidator kafkaPrivilegeValidator = new KafkaPrivilegeValidator();
  try {
    kafkaPrivilegeValidator.validate(new PrivilegeValidatorContext("host=host1->topic=t1->action=bla"));
    Assert.fail("Kafka privilege must end with a valid action.");
  } catch (ConfigurationException ex) {
    Assert.assertEquals("Kafka privilege must end with a valid action.\n" + KafkaPrivilegeValidator.KafkaPrivilegeHelpMsg, ex.getMessage());
  }
}