  @Test
  public void getStateDtoByNameShouldReturnStateDtoWhenValidNameIsGiven() {

    //Given
    given(statesRepository.findByName(VALID_STATE_NAME)).willReturn(validStatesEntity);
    given(converterService.convert(validStatesEntity, StateDTO.class)).willReturn(validStateDTO);

    StateDTO
        expectedStateDTO =
        StateDTO.builder().id(VALID_STATE_ID).name(VALID_STATE_NAME).build();

    //When
    StateDTO result = stateService.getStateDtoByName(VALID_STATE_NAME);

    //Then
    assertThat(result, notNullValue());
    assertThat(result, is(expectedStateDTO));
  }