source: class QueryCleanupTaskTest {
  
  	private final Duration queryExpiration;
  	private MetaStorage storageMock;
  	private Map<ManagedExecutionId, ? super ManagedExecution<?>> executions;
  	private Map<UserId,User> users;
  
  	@Test
  	void reusedNames() throws Exception {
  
target: 		assertThat(storageMock.getAllExecutions()).isEmpty();
  
  		final ManagedQuery managedQuery = createManagedQuery();
  
  		final ManagedQuery managedQueryReused = createManagedQuery();
  		managedQueryReused.setLabel("test2");
  
  		managedQuery.setQuery(new ConceptQuery(new CQReusedQuery(managedQueryReused.getId())));
  
  		new QueryCleanupTask(storageMock, queryExpiration).execute( Map.of(), null);
  
  		assertThat(executions.values()).containsExactlyInAnyOrder(managedQueryReused);
  	}
  
  }