test_class.declarator: SCHEMA_PATTERN = "schema_%s"
test_class.modifier: private static final
test_class.original_string: private static final String SCHEMA_PATTERN = "schema_%s";
test_class.type: String
test_class.var_name: SCHEMA_PATTERN
test_class.declarator: backendConnection = new BackendConnection(TransactionType.LOCAL)
test_class.modifier: @Spy
      private
test_class.original_string: @Spy
      private BackendConnection backendConnection = new BackendConnection(TransactionType.LOCAL);
test_class.type: BackendConnection
test_class.var_name: backendConnection
test_class.declarator: databaseCommunicationEngineFactory
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private DatabaseCommunicationEngineFactory databaseCommunicationEngineFactory;
test_class.type: DatabaseCommunicationEngineFactory
test_class.var_name: databaseCommunicationEngineFactory
test_class.file: shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/UnicastBackendHandlerTest.java
test_class.identifier: UnicastBackendHandlerTest
test_case.body: @Test
      public void assertExecuteWhileSchemaNotNull() throws SQLException {
          backendConnection.setCurrentSchema(String.format(SCHEMA_PATTERN, 0));
          UnicastBackendHandler backendHandler = new UnicastBackendHandler("show variable like %s", mock(SQLStatement.class), backendConnection);
          setDatabaseCommunicationEngine(backendHandler);
          BackendResponse actual = backendHandler.execute();
          assertThat(actual, instanceOf(UpdateResponse.class));
          backendHandler.execute();
      }
test_case.class_method_signature: UnicastBackendHandlerTest.assertExecuteWhileSchemaNotNull()
test_case.full_signature: @Test public void assertExecuteWhileSchemaNotNull()
test_case.identifier: assertExecuteWhileSchemaNotNull
test_case.invocations: setCurrentSchema format mock setDatabaseCommunicationEngine execute assertThat instanceOf execute
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertExecuteWhileSchemaNotNull()
focal_class.declarator: databaseCommunicationEngineFactory = DatabaseCommunicationEngineFactory.getInstance()
focal_class.modifier: private final
focal_class.original_string: private final DatabaseCommunicationEngineFactory databaseCommunicationEngineFactory = DatabaseCommunicationEngineFactory.getInstance();
focal_class.type: DatabaseCommunicationEngineFactory
focal_class.var_name: databaseCommunicationEngineFactory
focal_class.declarator: sql
focal_class.modifier: private final
focal_class.original_string: private final String sql;
focal_class.type: String
focal_class.var_name: sql
focal_class.declarator: sqlStatement
focal_class.modifier: private final
focal_class.original_string: private final SQLStatement sqlStatement;
focal_class.type: SQLStatement
focal_class.var_name: sqlStatement
focal_class.declarator: backendConnection
focal_class.modifier: private final
focal_class.original_string: private final BackendConnection backendConnection;
focal_class.type: BackendConnection
focal_class.var_name: backendConnection
focal_class.declarator: databaseCommunicationEngine
focal_class.modifier: private
focal_class.original_string: private DatabaseCommunicationEngine databaseCommunicationEngine;
focal_class.type: DatabaseCommunicationEngine
focal_class.var_name: databaseCommunicationEngine
focal_class.file: shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/UnicastBackendHandler.java
focal_class.identifier: UnicastBackendHandler
focal_class.interfaces: implements TextProtocolBackendHandler
focal_class.class_method_signature: UnicastBackendHandler.execute()
focal_class.full_signature: @Override public BackendResponse execute()
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: BackendResponse
focal_class.signature: BackendResponse execute()
focal_class.class_method_signature: UnicastBackendHandler.next()
focal_class.full_signature: @Override public boolean next()
focal_class.identifier: next
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean next()
focal_class.class_method_signature: UnicastBackendHandler.getQueryData()
focal_class.full_signature: @Override public QueryData getQueryData()
focal_class.identifier: getQueryData
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: QueryData
focal_class.signature: QueryData getQueryData()
focal_method.body: @Override
      public BackendResponse execute() throws SQLException {
          if (null == backendConnection.getSchemaName()) {
              Map<String, ShardingSphereSchema> schemas = ProxyContext.getInstance().getSchemaContexts().getSchemas();
              if (schemas.isEmpty()) {
                  throw new NoDatabaseSelectedException();
              }
              if (!schemas.values().iterator().next().isComplete()) {
                  throw new RuleNotExistsException();
              }
              // TODO we should remove set default ShardingSphere schema after parser can recognize all DAL broadcast SQL.
              backendConnection.setCurrentSchema(schemas.keySet().iterator().next());
          }
          databaseCommunicationEngine = databaseCommunicationEngineFactory.newTextProtocolInstance(sqlStatement, sql, backendConnection);
          return databaseCommunicationEngine.execute();
      }
focal_method.class_method_signature: UnicastBackendHandler.execute()
focal_method.full_signature: @Override public BackendResponse execute()
focal_method.identifier: execute
focal_method.invocations: getSchemaName getSchemas getSchemaContexts getInstance isEmpty isComplete next iterator values setCurrentSchema next iterator keySet newTextProtocolInstance execute
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: BackendResponse
focal_method.signature: BackendResponse execute()