propsBuilder.headers(headers);
channel.basicPublish(ex, to, propsBuilder.build(), new byte[0]);
}
private void expect(String[] expectedQueues, boolean usedCc) throws IOException {
GetResponse getResponse;
List<String> expectedList = Arrays.asList(expectedQueues);
for (String q : queues) {
getResponse = basicGet(q);
if (expectedList.contains(q)) {
assertNotNull(getResponse);
assertEquals(0, getResponse.getMessageCount());
Map<?, ?> headers = getResponse.getProps().getHeaders();
if (headers != null){
assertEquals(usedCc, headers.containsKey("CC"));
assertFalse(headers.containsKey("BCC"));
}
} else {