@Test
public void findSwaggerByApiTest() {

     Mockito.when(apiRepository.findOne(Mockito.anyLong())).thenReturn(api);
     Mockito.when(resourceRepository.findAll(Mockito.any(Example.class))).thenReturn(Mockito.anyList());
     Mockito.when(swaggerService.exportApiToSwaggerJSON(api)).thenReturn(new Swagger());
     Swagger result = this.apiService.findSwaggerByApi(1L);
     Mockito.verify(swaggerService, Mockito.times(1)).exportApiToSwaggerJSON(api);
     assertNotNull(result);
}