class NumberProvider {

  public int provideNumber() {
    return 42;
  }

}

class NumberProviderTest {

  @Test public void shouldProvideProperNumber() {

    // given
    NumberProvider numberProvider = new NumberProvider();

    // when
    int number = numberProvider.provideNumber();

    // then
    assertThat(number).isEqualTo(42);
  }

}