AutonomiccsServiceOfferingService { public ServiceOfferingVO searchAutonomiccsServiceOffering() { return searchServiceOfferingByName(AUTONOMICCS_SYSTEM_VM_SERVICE_OFFERING_UNIQUE_NAME); }  ServiceOfferingVO searchAutonomiccsServiceOffering(); ServiceOfferingVO searchServiceOfferingById(long id); void createAutonomiccsServiceOffering();  }
@Test public void searchAutonomiccsServiceOfferingTest() { ServiceOfferingVO serviceOffering = createServiceOfferingVo("serviceOfferingVoName"); Mockito.doReturn(serviceOffering).when(spy).searchServiceOfferingByName(Mockito.eq(AUTONOMICCS_SYSTEM_VM_SERVICE_OFFERING_UNIQUE_NAME)); ServiceOfferingVO result = spy.searchAutonomiccsServiceOffering(); Mockito.verify(spy).searchServiceOfferingByName(Mockito.eq(AUTONOMICCS_SYSTEM_VM_SERVICE_OFFERING_UNIQUE_NAME)); Assert.assertEquals(serviceOffering, result); }