QueueUtils { public static String getQueueName(Task task) { return getQueueName(task.getTaskType(), task.getDomain(), task.getIsolationGroupId(), task.getExecutionNameSpace()); }  static String getQueueName(Task task); static String getQueueName(String taskType, String domain, String isolationGroup, String executionNameSpace); static String getQueueNameWithoutDomain(String queueName); static String getExecutionNameSpace(String queueName); static boolean isIsolatedQueue(String queue); static String getTaskType(String queue); static final String DOMAIN_SEPARATOR; static final String ISOLATION_SEPARATOR; static final String EXECUTION_NAME_SPACE_SEPRATOR; }
@Test public void queueNameWithTypeAndIsolationGroup() { String queueNameGenerated = QueueUtils.getQueueName("tType", null, "isolationGroup",null); String queueNameGeneratedOnlyType = QueueUtils.getQueueName("tType", null, null,null); String queueNameGeneratedWithAllValues = QueueUtils.getQueueName("tType", "domain", "iso","eN"); Assert.assertEquals("tType-isolationGroup", queueNameGenerated); Assert.assertEquals("tType", queueNameGeneratedOnlyType); Assert.assertEquals("domain:tType@eN-iso", queueNameGeneratedWithAllValues); }
@Test public void testGetQueueName() { Assert.assertEquals("domain:taskType@eN-isolated", QueueUtils.getQueueName("taskType", "domain", "isolated", "eN")); }