### Question:
EmbeddedJMSBrokerHolder implements AutoCloseable, ConnectionFactoryAccessor, ActiveMQConnectionFactoryAccessor, BrokerURIAccessor { public static EmbeddedJMSBrokerHolder create(final String name, boolean marshal, boolean persistent) { final File tempDir = Files.createTempDir(); LOGGER.debug("Created temporary directory: \"{}\"", tempDir.getAbsolutePath()); return new EmbeddedJMSBrokerHolder(createAndConfigureBrokerService(new BrokerSettings(name, marshal, persistent, tempDir)), tempDir); } EmbeddedJMSBrokerHolder(final BrokerService brokerService, final File tempDir); BrokerService getBrokerService(); @Override ConnectionFactory getConnectionFactory(); @Override ActiveMQConnectionFactory getActiveMQConnectionFactory(); @Override URI getBrokerUri(); static EmbeddedJMSBrokerHolder create(final String name, boolean marshal, boolean persistent); void start(); @Override void close();  }### Answer:
@DisplayName("Create EmbeddedJMSBrokerHolder instance") @Test void create() throws Exception { try (final EmbeddedJMSBrokerHolder embeddedJmsBrokerHolder = EmbeddedJMSBrokerHolder .create("name", false, false)) { assertNotNull(embeddedJmsBrokerHolder.getBrokerService()); assertFalse(embeddedJmsBrokerHolder.getBrokerService().isStarted()); } }
@DisplayName("Creating a broker using an illegal URI as name should fail") @Test void createFails() { assertThrows(IllegalStateException.class, () -> EmbeddedJMSBrokerHolder .create("\\\\\\", false, false)); }