title: Localstack create SNS topic for java integration test
body: <p>I am writing an integration test where I use stack to spin up a localstack docker container mocking AWS services.</p>
  
  <p>This code will spin up the docker container </p>
  
  <pre><code>@RunWith(LocalstackTestRunner.class)
  @LocalstackDockerProperties(services = {"dynamodb", "sns"})
  </code></pre>
  
  <p>Then i call a publisher from my applilcation from within one of my tests. But i get a topic not found exception </p>
  
  <pre><code>com.amazonaws.services.sns.model.NotFoundException: Topic does not exist (Service: AmazonSNS; Status Code: 404; Error Code: NotFound; Request ID: 06c6a626)
  </code></pre>
  
  <p>I can't seem to find a good example of creating the SNS topic for the unit test with java online. I can find a command for the aws CLI that would create it something like this </p>
  
  <pre><code>$ aws --endpoint-url=http://localhost:4575 sns create-topic --name my_topic
  </code></pre>
  
  <p>But I am looking for something I can use inside my spring boot unit test.</p>