### Question:
ResetSessionTask implements DataDefinitionTask<ResetSession> { @Override public ListenableFuture<?> execute(ResetSession statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, QueryStateMachine stateMachine, List<Expression> parameters) { List<String> parts = statement.getName().getParts(); if (parts.size() > 2) { throw semanticException(INVALID_SESSION_PROPERTY, statement, "Invalid session property '%s'", statement.getName()); } if (parts.size() == 1) { metadata.getSessionPropertyManager().getSystemSessionPropertyMetadata(parts.get(0)) .orElseThrow(() -> semanticException(INVALID_SESSION_PROPERTY, statement, "Session property '%s' does not exist", statement.getName())); } else { CatalogName catalogName = metadata.getCatalogHandle(stateMachine.getSession(), parts.get(0)) .orElseThrow(() -> semanticException(CATALOG_NOT_FOUND, statement, "Catalog '%s' does not exist", parts.get(0))); metadata.getSessionPropertyManager().getConnectorSessionPropertyMetadata(catalogName, parts.get(1)) .orElseThrow(() -> semanticException(INVALID_SESSION_PROPERTY, statement, "Session property '%s' does not exist", statement.getName())); } stateMachine.addResetSessionProperties(statement.getName().toString()); return immediateFuture(null); }  @Override String getName(); @Override ListenableFuture<?> execute(ResetSession statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, QueryStateMachine stateMachine, List<Expression> parameters);  }### Answer:
@Test public void test() { Session session = testSessionBuilder(metadata.getSessionPropertyManager()) .setSystemProperty("foo", "bar") .setCatalogSessionProperty(CATALOG_NAME, "baz", "blah") .build(); QueryStateMachine stateMachine = QueryStateMachine.begin( "reset foo", Optional.empty(), session, URI.create("fake: new ResourceGroupId("test"), false, transactionManager, accessControl, executor, metadata, WarningCollector.NOOP, Optional.empty()); getFutureValue(new ResetSessionTask().execute( new ResetSession(QualifiedName.of(CATALOG_NAME, "baz")), transactionManager, metadata, accessControl, stateMachine, emptyList())); Set<String> sessionProperties = stateMachine.getResetSessionProperties(); assertEquals(sessionProperties, ImmutableSet.of("catalog.baz")); }