AutonomiccsServiceOfferingService { public ServiceOfferingVO searchServiceOfferingById(long id) { return serviceOfferingDao.findById(id); }  ServiceOfferingVO searchAutonomiccsServiceOffering(); ServiceOfferingVO searchServiceOfferingById(long id); void createAutonomiccsServiceOffering();  }
@Test public void searchServiceOfferingByIdTest() { ServiceOfferingVO serviceOffering = createServiceOfferingVo("serviceOfferingVoName"); Mockito.doReturn(serviceOffering).when(serviceOfferingDao).findById(Mockito.anyLong()); ServiceOfferingVO result = spy.searchServiceOfferingById(11l); Mockito.verify(serviceOfferingDao).findById(Mockito.eq(11l)); Assert.assertEquals(serviceOffering, result); }