MessageUtils { public static String getRealQueueName(String queueName, CloudType cloudType) { return cloudType != null ? String.format("%s_%s", cloudType.value(), queueName) : queueName; }  static Optional<Message> retry(Message message); static boolean canRetry(Message message); static Message message(CloudType cloudType, Serializable payload, int ttl); static Message message(CloudType cloudType, Serializable payload); static Message message(Serializable payload); static String getRealQueueName(String queueName, CloudType cloudType);  }
@Test public void testGetRealQueueName() { assertThat(getRealQueueName("test", MOCK), equalTo("mock_test")); assertThat(getRealQueueName("test", null), equalTo("test")); }