@Test
public void testSendGradient() {

    // Given
    byte[] gradient = new byte[]{};
    NetworkModel networkModel = mock(NetworkModel.class);
    NetworkMapper mapper = mock(NetworkMapper.class);
    given(mapper.toNetworkModel(gradient)).willReturn(networkModel);
    given(networkModel.getGradient()).willReturn(gradient);
    ServerService networkService = mock(ServerService.class);
    // When
    ServerDataSource dataSource = new ServerDataSource(networkService, mapper);
    dataSource.sendGradient(gradient);
    // Then
    verify(mapper).toNetworkModel(gradient);
    verify(networkService).uploadGradient(any(RequestBody.class));
}