FeignLambdaServiceInvokerClient extends AbstractFeignLambdaServiceClient { LambdaInvokerService getInvokerService() { return service; } FeignLambdaServiceInvokerClient(@Nonnull AWSLambda awsLambdaClient, @Nonnull String functionName,
			@Nullable String functionAlias, @Nullable String functionVersion);   FeignLambdaServiceInvokerClient(LambdaInvokerFactory.Builder builder, AWSLambda awsLambdaClient,
			String functionName, String functionAlias, String functionVersion); static Builder builder();  }
@Test public void init_LambdaClientGiven_ShouldUseOnInvocationBuilder() { AWSLambda myLambdaClient = mock(AWSLambda.class); FeignLambdaServiceInvokerClient invokerClient = init(myLambdaClient, FUNCTION_NAME, null, null); verify(lambdaInvokerFactoryBuilder).lambdaClient(myLambdaClient); verify(lambdaInvokerFactoryBuilder).lambdaFunctionNameResolver(eqFn(FUNCTION_NAME)); verify(lambdaInvokerFactoryBuilder).functionAlias(isNull()); verify(lambdaInvokerFactoryBuilder).functionVersion(isNull()); verify(lambdaInvokerFactoryBuilder).build(LambdaInvokerService.class); assertEquals(service, invokerClient.getInvokerService()); }
@Test public void init_FunctionNameGiven_ShouldUseOnInvocationBuilder() { FeignLambdaServiceInvokerClient invokerClient = init(lambdaClient, "myFunctionName", null, null); verify(lambdaInvokerFactoryBuilder).lambdaClient(lambdaClient); verify(lambdaInvokerFactoryBuilder).lambdaFunctionNameResolver(eqFn("myFunctionName")); verify(lambdaInvokerFactoryBuilder).functionAlias(isNull()); verify(lambdaInvokerFactoryBuilder).functionVersion(isNull()); verify(lambdaInvokerFactoryBuilder).build(LambdaInvokerService.class); assertEquals(service, invokerClient.getInvokerService()); }
@Test public void init_FunctionAliasGiven_ShouldUseOnInvocationBuilder() { FeignLambdaServiceInvokerClient invokerClient = init(lambdaClient, FUNCTION_NAME, "myFunctionAlias", null); verify(lambdaInvokerFactoryBuilder).lambdaClient(lambdaClient); verify(lambdaInvokerFactoryBuilder).lambdaFunctionNameResolver(eqFn(FUNCTION_NAME)); verify(lambdaInvokerFactoryBuilder).functionAlias("myFunctionAlias"); verify(lambdaInvokerFactoryBuilder).functionVersion(isNull()); verify(lambdaInvokerFactoryBuilder).build(LambdaInvokerService.class); assertEquals(service, invokerClient.getInvokerService()); }
@Test public void init_FunctionVersionGiven_ShouldUseOnInvocationBuilder() { FeignLambdaServiceInvokerClient invokerClient = init(lambdaClient, FUNCTION_NAME, null, "myFunctionVersion"); verify(lambdaInvokerFactoryBuilder).lambdaClient(lambdaClient); verify(lambdaInvokerFactoryBuilder).lambdaFunctionNameResolver(eqFn(FUNCTION_NAME)); verify(lambdaInvokerFactoryBuilder).functionAlias(isNull()); verify(lambdaInvokerFactoryBuilder).functionVersion("myFunctionVersion"); verify(lambdaInvokerFactoryBuilder).build(LambdaInvokerService.class); assertEquals(service, invokerClient.getInvokerService()); }
@Test public void testInitCreatesService() { assertNotNull(new FeignLambdaServiceInvokerClient(lambdaClient, FUNCTION_NAME, null, null).getInvokerService()); }