@Test
public void testClusterResourceNameIsRestricted() throws Exception {

  try {
    KafkaModelAuthorizables.from("Cluster=cluster1");
    fail("Cluster with name other than " + Cluster.NAME + " must not have been created.");
  } catch (ConfigurationException cex) {
    assertEquals("Exception message is not as expected.", "Kafka's cluster resource can only have name " + Cluster.NAME, cex.getMessage());
  } catch (Exception ex) {
    fail("Configuration exception was expected for invalid Cluster name.");
  }
}