Search in sources :

Example 1 with AWSClient

use of com.hazelcast.aws.AWSClient in project hazelcast by hazelcast.

the class AwsAddressTranslatorTest method setUp.

@Before
public void setUp() throws Exception {
    privateAddress = new Address("127.0.0.1", 5701);
    publicAddress = new Address("192.168.0.1", 5701);
    awsClient = mock(AWSClient.class);
    when(awsClient.getAddresses()).thenReturn(lookup);
    config = new ClientAwsConfig();
    config.setIamRole("anyRole");
    ILogger logger = Logger.getLogger(AwsAddressTranslatorTest.class);
    loggingService = mock(LoggingService.class);
    when(loggingService.getLogger(eq(AwsAddressTranslator.class))).thenReturn(logger);
    translator = new AwsAddressTranslator(config, loggingService);
}
Also used : Address(com.hazelcast.nio.Address) LoggingService(com.hazelcast.logging.LoggingService) ILogger(com.hazelcast.logging.ILogger) AWSClient(com.hazelcast.aws.AWSClient) ClientAwsConfig(com.hazelcast.client.config.ClientAwsConfig) Before(org.junit.Before)

Aggregations

AWSClient (com.hazelcast.aws.AWSClient)1 ClientAwsConfig (com.hazelcast.client.config.ClientAwsConfig)1 ILogger (com.hazelcast.logging.ILogger)1 LoggingService (com.hazelcast.logging.LoggingService)1 Address (com.hazelcast.nio.Address)1 Before (org.junit.Before)1