### Question:
StigmaGenerator { @Nonnull public StigmaDetails newStigma() { final String stigmaValue = String.valueOf(random.nextLong()); return new StigmaDetails( new Stigma(stigmaValue), StigmaStatus.ACTIVE, nowSource.now() ); } StigmaGenerator(final NowSource nowSource);  StigmaGenerator(final SecureRandom random, final NowSource nowSource); @Nonnull StigmaDetails newStigma();  }### Answer:
@Test void should_generate_new_stigma() { given(random.nextLong()).willReturn(STIGMA_VALUE); given(nowSource.now()).willReturn(NOW); final StigmaDetails result = stigmaGenerator.newStigma(); assertThat(result).isEqualTo( new StigmaDetails(new Stigma(String.valueOf(STIGMA_VALUE)), StigmaStatus.ACTIVE, NOW) ); }