@Test void createInstance_stackWithTwoResources_returnsStackResourceRegistryWithTwoResources() throws Exception { Map<String, String> resourceIdMappings = new HashMap<>(); resourceIdMappings.put("logicalResourceIdOne", "physicalResourceIdOne"); resourceIdMappings.put("logicalResourceIdTwo", "physicalResourceIdTwo"); StackResourceRegistryFactoryBean stackResourceRegistryFactoryBean = makeStackResourceRegistryFactoryBean( STACK_NAME, resourceIdMappings); StackResourceRegistry stackResourceRegistry = stackResourceRegistryFactoryBean .createInstance(); assertThat(stackResourceRegistry.lookupPhysicalResourceId("logicalResourceIdOne")) .isEqualTo("physicalResourceIdOne"); assertThat(stackResourceRegistry.lookupPhysicalResourceId("logicalResourceIdTwo")) .isEqualTo("physicalResourceIdTwo"); }
@Override protected ListableStackResourceFactory createInstance() { String stackName = this.stackNameProvider.getStackName(); return new StaticStackResourceRegistry(stackName, getResourceMappings("", stackName)); }
StackResourceRegistryFactoryBean extends AbstractFactoryBean<ListableStackResourceFactory> { @Override protected ListableStackResourceFactory createInstance() { String stackName = this.stackNameProvider.getStackName(); return new StaticStackResourceRegistry(stackName, getResourceMappings("", stackName)); } }
StackResourceRegistryFactoryBean extends AbstractFactoryBean<ListableStackResourceFactory> { @Override protected ListableStackResourceFactory createInstance() { String stackName = this.stackNameProvider.getStackName(); return new StaticStackResourceRegistry(stackName, getResourceMappings("", stackName)); } StackResourceRegistryFactoryBean(
			AmazonCloudFormation amazonCloudFormationClient,
			StackNameProvider stackNameProvider); }
StackResourceRegistryFactoryBean extends AbstractFactoryBean<ListableStackResourceFactory> { @Override protected ListableStackResourceFactory createInstance() { String stackName = this.stackNameProvider.getStackName(); return new StaticStackResourceRegistry(stackName, getResourceMappings("", stackName)); } StackResourceRegistryFactoryBean(
			AmazonCloudFormation amazonCloudFormationClient,
			StackNameProvider stackNameProvider); @Override Class<?> getObjectType(); }
StackResourceRegistryFactoryBean extends AbstractFactoryBean<ListableStackResourceFactory> { @Override protected ListableStackResourceFactory createInstance() { String stackName = this.stackNameProvider.getStackName(); return new StaticStackResourceRegistry(stackName, getResourceMappings("", stackName)); } StackResourceRegistryFactoryBean(
			AmazonCloudFormation amazonCloudFormationClient,
			StackNameProvider stackNameProvider); @Override Class<?> getObjectType();  }