@Test
public void updateBySwaggerTest() throws IOException {

     Mockito.when(apiRepository.findOne(Mockito.anyLong())).thenReturn(api);
     Mockito.when(swaggerService.importApiFromSwaggerJSON(api, "adsqwe", false)).thenReturn(api);
     apiService.updateBySwagger(1L, "asd", false);
     Mockito.verify(apiRepository, Mockito.times(1)).save(Mockito.any(Api.class));
}