{
ConnectionFactory factory = new ConnectionFactory();
factory.setUsername("testadmin");
factory.setPassword("test");
factory.setVirtualHost("/test");
Connection connection = factory.newConnection();
adminCh = connection.createChannel();
withNames(new WithName() {
public void with(String name) throws IOException {
adminCh.exchangeDeclare(name, "direct");
adminCh.queueDeclare(name, false, false, false, null);