### Question:
StigmaService { @Nonnull public StigmaDetails getNewStigma() { final StigmaDetails newStigma = stigmaGenerator.newStigma(); store(newStigma); return newStigma; } StigmaService(@Nonnull final StigmaStorage stigmaStorage,
                         @Nonnull final StigmaExtractor stigmaExtractor,
                         @Nonnull final StigmaGenerator stigmaGenerator); @Nullable StigmaDetails findStigmaDetails(@Nullable final RawStigmaToken stigmaToken); void revokeStigma(@Nonnull final Stigma stigma); @Nonnull StigmaDetails getNewStigma();  }### Answer:
@Test void should_generate_new_stigma() { final Stigma stigma = new Stigma("new-stigma-value"); final StigmaDetails stigmaDetails = new StigmaDetails(stigma, StigmaStatus.ACTIVE, Instant.parse("2020-01-22T11:26:44.512Z")); given(stigmaGenerator.newStigma()).willReturn(stigmaDetails); final StigmaDetails result = stigmaService.getNewStigma(); assertThat(result).isEqualTo(stigmaDetails); verify(stigmaStorage).save(stigmaDetails); }