Account acct = new Account.Builder().name("testacct").build();
acct.setId(accountId);
Connection mockConnection = mock(Connection.class);
when(mockConnection.getAccount()).thenReturn(acct);
OutboundConfiguration mockOutboundConfiguration = mock(OutboundConfiguration.class);
when(mockOutboundConfiguration.getNamespace()).thenReturn(null);
when(mockOutboundConfiguration.getOriginatingConnection()).thenReturn(mockConnection);
String bucketName = awsClientUnderTest.convertOutboundConnectionToBucketName(mockOutboundConfiguration);
String expected = "com.streamreduce." + accountId.toString();
assertEquals(expected,bucketName);
}