title: Embedded Redis for Spring Boot
body: <p>I run my Integration Test cases with Spring Boot with the help of my local Redis server on my machine.</p>
  
  <p>But I want an embedded Redis server which is not dependent on any server and can run on any environment, like the H2 in-memory database. How can I do it?</p>
  
  <pre><code>@RunWith(SpringJUnit4ClassRunner.class)
  @WebAppConfiguration
  @IntegrationTest("server.port:0")
  @SpringApplicationConfiguration(classes = Application.class) 
  @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS)
  public class MasterIntegrationTest {
  
  }
  </code></pre>