SQSQueueFactoryImpl implements TaskQueueFactory { @VisibleForTesting public String getQueueName(HandlerKey handlerKey) { String queueName = queueNameTemplate. replace("{{id}}", this.queueId). replace("{{entity}}", handlerKey.getEntityType().toString()). replace("{{port}}", handlerKey.getHandle()); return queueName; } SQSQueueFactoryImpl(String template, String region, String queueId, boolean purgeBuffer); @Override TaskQueue<T> getTaskQueue(@Nonnull HandlerKey key,
                                                                     int threadNum); @VisibleForTesting String getQueueName(HandlerKey handlerKey); static boolean isValidSQSTemplate(String template);  }
@Test public void testQueueNameGeneration() { SQSQueueFactoryImpl queueFactory = new SQSQueueFactoryImpl( new ProxyConfig().getSqsQueueNameTemplate(),"us-west-2","myid", false); assertEquals("wf-proxy-myid-points-2878", queueFactory.getQueueName(HandlerKey.of(ReportableEntityType.POINT, "2878"))); }