package Ġcom . example Ċ Ċ import Ġorg . springframework . stereotype . Service Ċ import Ġorg . test containers . containers . Docker Compose Container Ċ import Ġjava . io . File Ċ import Ġjavax . annotation . Post Construct Ċ Ċ @ Service Ċ class ĠMongo Container Ġ: ĠDocker Compose Container < Mongo Container >( File (" src / test / resources / docker - compose - test . yml ")) Ġ{ ĊĠĠĠ Ġ@ Post Construct ĊĠĠĠ Ġfun Ġinit () Ġ{ ĊĠĠĠĠĠĠĠ Ġthis . start () ĊĠĠĠ Ġ} Ċ }