test_class.declarator: start = System.currentTimeMillis()
test_class.modifier: private
test_class.original_string: private Long start = System.currentTimeMillis();
test_class.type: Long
test_class.var_name: start
test_class.declarator: venService
test_class.modifier: @Resource
  	private
test_class.original_string: @Resource
  	private VenService venService;
test_class.type: VenService
test_class.var_name: venService
test_class.declarator: venResourceService
test_class.modifier: @Resource
  	private
test_class.original_string: @Resource
  	private VenResourceService venResourceService;
test_class.type: VenResourceService
test_class.var_name: venResourceService
test_class.declarator: venMarketContextService
test_class.modifier: @Resource
  	private
test_class.original_string: @Resource
  	private VenMarketContextService venMarketContextService;
test_class.type: VenMarketContextService
test_class.var_name: venMarketContextService
test_class.declarator: venGroupService
test_class.modifier: @Resource
  	private
test_class.original_string: @Resource
  	private VenGroupService venGroupService;
test_class.type: VenGroupService
test_class.var_name: venGroupService
test_class.declarator: demandResponseEventService
test_class.modifier: @Resource
  	private
test_class.original_string: @Resource
  	private DemandResponseEventService demandResponseEventService;
test_class.type: DemandResponseEventService
test_class.var_name: demandResponseEventService
test_class.file: OpenADRServerVTNCommon/src/test/java/com/avob/openadr/server/common/vtn/service/VenServiceTest.java
test_class.identifier: VenServiceTest
test_case.body: @Test
  	public void searchTest() {
  		List<Ven> vens = new ArrayList<>();
  		List<DemandResponseEvent> events = new ArrayList<>();
  		VenMarketContext marketContext = null;
  		Ven ven1;
  		Ven ven2;
  		Ven ven3;
  		DemandResponseEvent event1 = null;
  		DemandResponseEvent event2 = null;
  		DemandResponseEvent event3 = null;
  
  		String marketContextName = "http://oadr.avob.com";
  		marketContext = venMarketContextService.prepare(new VenMarketContextDto(marketContextName));
  		venMarketContextService.save(marketContext);
  
  		String groupName = "group1";
  		VenGroup group = venGroupService.prepare(new VenGroupDto(groupName));
  		venGroupService.save(group);
  
  		ven1 = venService.prepare("ven1");
  		ven1.setVenMarketContexts(Sets.newHashSet(marketContext));
  		ven1.setVenGroup(Sets.newHashSet(group));
  		ven1 = venService.save(ven1);
  		vens.add(ven1);
  
  		ven2 = venService.prepare("ven2");
  		ven2.setVenMarketContexts(Sets.newHashSet(marketContext));
  		ven2 = venService.save(ven2);
  		vens.add(ven2);
  
  		ven3 = venService.prepare("ven3");
  		ven3.setVenMarketContexts(Sets.newHashSet(marketContext));
  		ven3.setVenGroup(Sets.newHashSet(group));
  		ven3 = venService.save(ven3);
  		vens.add(ven3);
  
  		String duration = "PT1H";
  		String notificationDuration = "P1D";
  
  		DemandResponseEventStateEnum state = DemandResponseEventStateEnum.ACTIVE;
  
  		DemandResponseEventSignalDto signal = new DemandResponseEventSignalDto();
  		signal.setCurrentValue(DemandResponseEventSimpleValueEnum.SIMPLE_SIGNAL_PAYLOAD_HIGH.getValue());
  		signal.setSignalName("SIMPLE");
  		signal.setSignalType("level");
  
  		DemandResponseEventCreateDto dto = new DemandResponseEventCreateDto();
  		dto.getDescriptor().setState(state);
  		dto.getDescriptor().setOadrProfile(DemandResponseEventOadrProfileEnum.OADR20B);
  		dto.getActivePeriod().setStart(start);
  		dto.getDescriptor().setMarketContext(marketContext.getName());
  		dto.getActivePeriod().setDuration(duration);
  		dto.getActivePeriod().setNotificationDuration(notificationDuration);
  		dto.getTargets().add(new DemandResponseEventTargetDto("ven", "ven1"));
  		dto.getTargets().add(new DemandResponseEventTargetDto("ven", "ven2"));
  		dto.getSignals().add(signal);
  		dto.setPublished(true);
  		event1 = demandResponseEventService.create(dto);
  		events.add(event1);
  
  		dto = new DemandResponseEventCreateDto();
  		dto.getDescriptor().setState(DemandResponseEventStateEnum.CANCELLED);
  		dto.getDescriptor().setOadrProfile(DemandResponseEventOadrProfileEnum.OADR20B);
  		dto.getActivePeriod().setStart(start);
  		dto.getDescriptor().setMarketContext(marketContext.getName());
  		dto.getActivePeriod().setDuration(duration);
  		dto.getActivePeriod().setNotificationDuration(notificationDuration);
  		dto.getActivePeriod().setRampUpDuration("PT1H");
  		dto.getActivePeriod().setRecoveryDuration("PT1H");
  		dto.getDescriptor().setVtnComment("comment");
  		dto.getTargets().add(new DemandResponseEventTargetDto("ven", "ven2"));
  		dto.getSignals().add(signal);
  		dto.setPublished(true);
  		event2 = demandResponseEventService.create(dto);
  		events.add(event2);
  
  		dto = new DemandResponseEventCreateDto();
  		dto.getDescriptor().setOadrProfile(DemandResponseEventOadrProfileEnum.OADR20B);
  		dto.getDescriptor().setState(state);
  		dto.getActivePeriod().setStart(start);
  		dto.getDescriptor().setMarketContext(marketContext.getName());
  		dto.getActivePeriod().setDuration(duration);
  		dto.getActivePeriod().setNotificationDuration(notificationDuration);
  		dto.getTargets().add(new DemandResponseEventTargetDto("ven", "ven3"));
  		dto.getSignals().add(signal);
  		dto.setPublished(true);
  		event3 = demandResponseEventService.create(dto);
  		events.add(event3);
  
  		String event1Id = String.valueOf(event1.getId());
  		String event2Id = String.valueOf(event2.getId());
  		String event3Id = String.valueOf(event3.getId());
  
  		List<VenFilter> filters = new ArrayList<>();
  		Page<Ven> search = venService.search(filters);
  		assertEquals(3, search.getTotalElements());
  
  		filters = new ArrayList<>();
  
  		filters.add(getFilter(VenFilterType.EVENT, event1Id));
  		search = venService.search(filters);
  		assertEquals(2, search.getTotalElements());
  
  		filters = new ArrayList<>();
  		filters.add(getFilter(VenFilterType.EVENT, event2Id));
  		search = venService.search(filters);
  		assertEquals(1, search.getTotalElements());
  
  		filters = new ArrayList<>();
  		filters.add(getFilter(VenFilterType.EVENT, event3Id));
  		search = venService.search(filters);
  		assertEquals(1, search.getTotalElements());
  
  		filters = new ArrayList<>();
  		filters.add(getFilter(VenFilterType.EVENT, event1Id));
  		filters.add(getFilter(VenFilterType.EVENT, event2Id));
  		search = venService.search(filters);
  		assertEquals(2, search.getTotalElements());
  
  		filters = new ArrayList<>();
  		filters.add(getFilter(VenFilterType.EVENT, event1Id));
  		filters.add(getFilter(VenFilterType.EVENT, event2Id));
  		filters.add(getFilter(VenFilterType.EVENT, event3Id));
  		search = venService.search(filters);
  		assertEquals(3, search.getTotalElements());
  
  		filters = new ArrayList<>();
  		filters.add(getFilter(VenFilterType.IS_REGISTERED, Boolean.TRUE.toString()));
  		search = venService.search(filters);
  		assertEquals(0, search.getTotalElements());
  
  		filters = new ArrayList<>();
  		filters.add(getFilter(VenFilterType.IS_REGISTERED, Boolean.FALSE.toString()));
  		search = venService.search(filters);
  		assertEquals(3, search.getTotalElements());
  
  		filters = new ArrayList<>();
  		filters.add(getFilter(VenFilterType.GROUP, groupName));
  		search = venService.search(filters);
  		assertEquals(2, search.getTotalElements());
  
  		filters = new ArrayList<>();
  		filters.add(getFilter(VenFilterType.GROUP, groupName));
  		filters.add(getFilter(VenFilterType.EVENT, event1Id));
  		search = venService.search(filters);
  		assertEquals(1, search.getTotalElements());
  
  		filters = new ArrayList<>();
  		filters.add(getFilter(VenFilterType.MARKET_CONTEXT, marketContextName));
  		filters.add(getFilter(VenFilterType.EVENT, event1Id));
  		search = venService.search(filters);
  		assertEquals(2, search.getTotalElements());
  
  		filters = new ArrayList<>();
  		filters.add(getFilter(VenFilterType.MARKET_CONTEXT, marketContextName));
  		filters.add(getFilter(VenFilterType.EVENT, event1Id));
  		filters.add(getFilter(VenFilterType.VEN, "ven1"));
  		search = venService.search(filters);
  		assertEquals(1, search.getTotalElements());
  
  		filters = new ArrayList<>();
  		filters.add(getFilter(VenFilterType.MARKET_CONTEXT, marketContextName));
  		filters.add(getFilter(VenFilterType.EVENT, event1Id));
  		filters.add(getFilter(VenFilterType.VEN, "ven"));
  		search = venService.search(filters);
  		assertEquals(2, search.getTotalElements());
  
  		filters = new ArrayList<>();
  		filters.add(getFilter(VenFilterType.MARKET_CONTEXT, marketContextName));
  		filters.add(getFilter(VenFilterType.EVENT, event1Id));
  		filters.add(getFilter(VenFilterType.VEN, "mouaiccool"));
  		search = venService.search(filters);
  		assertEquals(0, search.getTotalElements());
  
  		demandResponseEventService.delete(events);
  		venService.delete(vens);
  		venMarketContextService.delete(marketContext);
  		venGroupService.delete(group);
  	}
test_case.class_method_signature: VenServiceTest.searchTest()
test_case.full_signature: @Test public void searchTest()
test_case.identifier: searchTest
test_case.invocations: prepare save prepare save prepare setVenMarketContexts newHashSet setVenGroup newHashSet save add prepare setVenMarketContexts newHashSet save add prepare setVenMarketContexts newHashSet setVenGroup newHashSet save add setCurrentValue getValue setSignalName setSignalType setState getDescriptor setOadrProfile getDescriptor setStart getActivePeriod setMarketContext getDescriptor getName setDuration getActivePeriod setNotificationDuration getActivePeriod add getTargets add getTargets add getSignals setPublished create add setState getDescriptor setOadrProfile getDescriptor setStart getActivePeriod setMarketContext getDescriptor getName setDuration getActivePeriod setNotificationDuration getActivePeriod setRampUpDuration getActivePeriod setRecoveryDuration getActivePeriod setVtnComment getDescriptor add getTargets add getSignals setPublished create add setOadrProfile getDescriptor setState getDescriptor setStart getActivePeriod setMarketContext getDescriptor getName setDuration getActivePeriod setNotificationDuration getActivePeriod add getTargets add getSignals setPublished create add valueOf getId valueOf getId valueOf getId search assertEquals getTotalElements add getFilter search assertEquals getTotalElements add getFilter search assertEquals getTotalElements add getFilter search assertEquals getTotalElements add getFilter add getFilter search assertEquals getTotalElements add getFilter add getFilter add getFilter search assertEquals getTotalElements add getFilter toString search assertEquals getTotalElements add getFilter toString search assertEquals getTotalElements add getFilter search assertEquals getTotalElements add getFilter add getFilter search assertEquals getTotalElements add getFilter add getFilter search assertEquals getTotalElements add getFilter add getFilter add getFilter search assertEquals getTotalElements add getFilter add getFilter add getFilter search assertEquals getTotalElements add getFilter add getFilter add getFilter search assertEquals getTotalElements delete delete delete delete
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void searchTest()
focal_class.declarator: DEFAULT_SEARCH_SIZE = 20
focal_class.modifier: private static final
focal_class.original_string: private static final Integer DEFAULT_SEARCH_SIZE = 20;
focal_class.type: Integer
focal_class.var_name: DEFAULT_SEARCH_SIZE
focal_class.declarator: venDao
focal_class.modifier: @Resource
  	private
focal_class.original_string: @Resource
  	private VenDao venDao;
focal_class.type: VenDao
focal_class.var_name: venDao
focal_class.declarator: venResourceDao
focal_class.modifier: @Resource
  	private
focal_class.original_string: @Resource
  	private VenResourceDao venResourceDao;
focal_class.type: VenResourceDao
focal_class.var_name: venResourceDao
focal_class.declarator: venDemandResponseEventDao
focal_class.modifier: @Resource
  	private
focal_class.original_string: @Resource
  	private VenDemandResponseEventDao venDemandResponseEventDao;
focal_class.type: VenDemandResponseEventDao
focal_class.var_name: venDemandResponseEventDao
focal_class.declarator: generateX509VenService
focal_class.modifier: @Autowired(required = false)
  	private
focal_class.original_string: @Autowired(required = false)
  	private GenerateX509CertificateService generateX509VenService;
focal_class.type: GenerateX509CertificateService
focal_class.var_name: generateX509VenService
focal_class.declarator: digestAuthenticationProvider
focal_class.modifier: @Resource
  	private
focal_class.original_string: @Resource
  	private DigestAuthenticationProvider digestAuthenticationProvider;
focal_class.type: DigestAuthenticationProvider
focal_class.var_name: digestAuthenticationProvider
focal_class.declarator: mapper = new DozerBeanMapper()
focal_class.modifier: private
focal_class.original_string: private Mapper mapper = new DozerBeanMapper();
focal_class.type: Mapper
focal_class.var_name: mapper
focal_class.file: OpenADRServerVTNCommon/src/main/java/com/avob/openadr/server/common/vtn/service/VenService.java
focal_class.identifier: VenService
focal_class.class_method_signature: VenService.prepare(String username, String password)
focal_class.full_signature: public Ven prepare(String username, String password)
focal_class.identifier: prepare
focal_class.modifiers: public
focal_class.parameters: (String username, String password)
focal_class.return: Ven
focal_class.signature: Ven prepare(String username, String password)
focal_class.class_method_signature: VenService.prepare(String username)
focal_class.full_signature: public Ven prepare(String username)
focal_class.identifier: prepare
focal_class.modifiers: public
focal_class.parameters: (String username)
focal_class.return: Ven
focal_class.signature: Ven prepare(String username)
focal_class.class_method_signature: VenService.prepare(VenCreateDto dto)
focal_class.full_signature: public Ven prepare(VenCreateDto dto)
focal_class.identifier: prepare
focal_class.modifiers: public
focal_class.parameters: (VenCreateDto dto)
focal_class.return: Ven
focal_class.signature: Ven prepare(VenCreateDto dto)
focal_class.class_method_signature: VenService.generateCertificateIfRequired(VenCreateDto dto, Ven ven)
focal_class.full_signature: public Optional<File> generateCertificateIfRequired(VenCreateDto dto, Ven ven)
focal_class.identifier: generateCertificateIfRequired
focal_class.modifiers: public
focal_class.parameters: (VenCreateDto dto, Ven ven)
focal_class.return: Optional<File>
focal_class.signature: Optional<File> generateCertificateIfRequired(VenCreateDto dto, Ven ven)
focal_class.class_method_signature: VenService.delete(Ven instance)
focal_class.full_signature: @Override @Transactional public void delete(Ven instance)
focal_class.identifier: delete
focal_class.modifiers: @Override @Transactional public
focal_class.parameters: (Ven instance)
focal_class.return: void
focal_class.signature: void delete(Ven instance)
focal_class.class_method_signature: VenService.delete(Iterable<Ven> instances)
focal_class.full_signature: @Override public void delete(Iterable<Ven> instances)
focal_class.identifier: delete
focal_class.modifiers: @Override public
focal_class.parameters: (Iterable<Ven> instances)
focal_class.return: void
focal_class.signature: void delete(Iterable<Ven> instances)
focal_class.class_method_signature: VenService.save(Ven instance)
focal_class.full_signature: @Override public Ven save(Ven instance)
focal_class.identifier: save
focal_class.modifiers: @Override public
focal_class.parameters: (Ven instance)
focal_class.return: Ven
focal_class.signature: Ven save(Ven instance)
focal_class.class_method_signature: VenService.save(Iterable<Ven> instances)
focal_class.full_signature: @Override public void save(Iterable<Ven> instances)
focal_class.identifier: save
focal_class.modifiers: @Override public
focal_class.parameters: (Iterable<Ven> instances)
focal_class.return: void
focal_class.signature: void save(Iterable<Ven> instances)
focal_class.class_method_signature: VenService.findOneByUsername(String username)
focal_class.full_signature: public Ven findOneByUsername(String username)
focal_class.identifier: findOneByUsername
focal_class.modifiers: public
focal_class.parameters: (String username)
focal_class.return: Ven
focal_class.signature: Ven findOneByUsername(String username)
focal_class.class_method_signature: VenService.findOneByRegistrationId(String registrationId)
focal_class.full_signature: public Ven findOneByRegistrationId(String registrationId)
focal_class.identifier: findOneByRegistrationId
focal_class.modifiers: public
focal_class.parameters: (String registrationId)
focal_class.return: Ven
focal_class.signature: Ven findOneByRegistrationId(String registrationId)
focal_class.class_method_signature: VenService.findByUsernameInAndVenMarketContextsContains(List<String> username,
  			VenMarketContext venMarketContext)
focal_class.full_signature: public List<Ven> findByUsernameInAndVenMarketContextsContains(List<String> username,
  			VenMarketContext venMarketContext)
focal_class.identifier: findByUsernameInAndVenMarketContextsContains
focal_class.modifiers: public
focal_class.parameters: (List<String> username,
  			VenMarketContext venMarketContext)
focal_class.return: List<Ven>
focal_class.signature: List<Ven> findByUsernameInAndVenMarketContextsContains(List<String> username,
  			VenMarketContext venMarketContext)
focal_class.class_method_signature: VenService.findByGroupName(List<String> groupName)
focal_class.full_signature: public List<Ven> findByGroupName(List<String> groupName)
focal_class.identifier: findByGroupName
focal_class.modifiers: public
focal_class.parameters: (List<String> groupName)
focal_class.return: List<Ven>
focal_class.signature: List<Ven> findByGroupName(List<String> groupName)
focal_class.class_method_signature: VenService.findByMarketContextName(List<String> groupName)
focal_class.full_signature: public List<Ven> findByMarketContextName(List<String> groupName)
focal_class.identifier: findByMarketContextName
focal_class.modifiers: public
focal_class.parameters: (List<String> groupName)
focal_class.return: List<Ven>
focal_class.signature: List<Ven> findByMarketContextName(List<String> groupName)
focal_class.class_method_signature: VenService.findOne(Long id)
focal_class.full_signature: public Ven findOne(Long id)
focal_class.identifier: findOne
focal_class.modifiers: public
focal_class.parameters: (Long id)
focal_class.return: Ven
focal_class.signature: Ven findOne(Long id)
focal_class.class_method_signature: VenService.findAll()
focal_class.full_signature: public Iterable<Ven> findAll()
focal_class.identifier: findAll
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Iterable<Ven>
focal_class.signature: Iterable<Ven> findAll()
focal_class.class_method_signature: VenService.count()
focal_class.full_signature: public long count()
focal_class.identifier: count
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long count()
focal_class.class_method_signature: VenService.cleanRegistration(Ven ven)
focal_class.full_signature: public void cleanRegistration(Ven ven)
focal_class.identifier: cleanRegistration
focal_class.modifiers: public
focal_class.parameters: (Ven ven)
focal_class.return: void
focal_class.signature: void cleanRegistration(Ven ven)
focal_class.class_method_signature: VenService.search(List<VenFilter> filters)
focal_class.full_signature: public Page<Ven> search(List<VenFilter> filters)
focal_class.identifier: search
focal_class.modifiers: public
focal_class.parameters: (List<VenFilter> filters)
focal_class.return: Page<Ven>
focal_class.signature: Page<Ven> search(List<VenFilter> filters)
focal_class.class_method_signature: VenService.search(List<VenFilter> filters, Integer page, Integer size)
focal_class.full_signature: public Page<Ven> search(List<VenFilter> filters, Integer page, Integer size)
focal_class.identifier: search
focal_class.modifiers: public
focal_class.parameters: (List<VenFilter> filters, Integer page, Integer size)
focal_class.return: Page<Ven>
focal_class.signature: Page<Ven> search(List<VenFilter> filters, Integer page, Integer size)
focal_class.superclass: extends AbstractUserService<Ven>
focal_method.body: public Page<Ven> search(List<VenFilter> filters) {
  		return search(filters, null, null);
  	}
focal_method.class_method_signature: VenService.search(List<VenFilter> filters)
focal_method.full_signature: public Page<Ven> search(List<VenFilter> filters)
focal_method.identifier: search
focal_method.invocations: search
focal_method.modifiers: public
focal_method.parameters: (List<VenFilter> filters)
focal_method.return: Page<Ven>
focal_method.signature: Page<Ven> search(List<VenFilter> filters)