@Test
public void plansByApiTest() {

     List<Plan> plans = new ArrayList<>();
     plans.add(new Plan());
     plans.add(new Plan());
     api.setPlans(plans);
     Mockito.when(apiRepository.findOne(Mockito.anyLong())).thenReturn(api);
     List<Plan> plansResp = apiService.plansByApi(1L);
     assertNotNull(plansResp);
}