@Test
void createLocation(@Mock DistanceMatrixRow matrixRow) {

    String description = "new location";
    when(repository.createLocation(coordinates, description)).thenReturn(location);
    when(distanceMatrix.addLocation(any())).thenReturn(matrixRow);
    assertThat(locationService.createLocation(coordinates, description)).isTrue();
    verify(repository).createLocation(coordinates, description);
    verify(distanceMatrix).addLocation(location);
    verify(optimizer).addLocation(location, matrixRow);
}