title: How to set a @Value in a MicronautTest?
body: <p>I am using <a href="https://micronaut.io/" rel="nofollow noreferrer">Micronaut</a> as framework for developing an AWS Java Lambda.</p>
  
  <p>Micronaut supports <a href="https://docs.micronaut.io/latest/api/io/micronaut/context/annotation/Value.html" rel="nofollow noreferrer">@Value</a> for reading, well, "values".</p>
  
  <pre><code>@io.micronaut.context.annotation.Factory
  public class SomeFactory {
    public SomeFactory(
      @io.micronaut.context.annotation.Value("${NameOfValue}") 
      final String value) {
      ...
    }
    ...
  }
  </code></pre>
  
  <p>When <a href="https://micronaut-projects.github.io/micronaut-test/latest" rel="nofollow noreferrer">testing</a>, I want to set "NameOfValue" to a specific value, how can I do that?</p>
  
  <pre><code>@io.micronaut.test.annotation.MicronautTest
  class SomeLambdaIT {
  
    @org.junit.jupiter.api.Test
    void aTest() {
      // When this test runs, "NameOfValue" shall be set to a specific value
    }
  }
  </code></pre>