test_class.declarator: parsePacket
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private PostgreSQLComParsePacket parsePacket;
test_class.type: PostgreSQLComParsePacket
test_class.var_name: parsePacket
test_class.declarator: backendConnection
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private BackendConnection backendConnection;
test_class.type: BackendConnection
test_class.var_name: backendConnection
test_class.file: shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/binary/parse/PostgreSQLComParseExecutorTest.java
test_class.identifier: PostgreSQLComParseExecutorTest
test_case.body: @Test
      public void assertNewInstance() throws NoSuchFieldException, IllegalAccessException {
          when(parsePacket.getSql()).thenReturn("sql");
          when(parsePacket.getStatementId()).thenReturn("2");
          when(backendConnection.getConnectionId()).thenReturn(1);
          Field schemaContexts = ProxyContext.getInstance().getClass().getDeclaredField("schemaContexts");
          schemaContexts.setAccessible(true);
          schemaContexts.set(ProxyContext.getInstance(), new StandardSchemaContexts(getSchemas(),
                  mockSQLParserEngine(), mock(ExecutorKernel.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
          BinaryStatementRegistry.getInstance().register(1);
          PostgreSQLComParseExecutor actual = new PostgreSQLComParseExecutor(parsePacket, backendConnection);
          assertThat(actual.execute().iterator().next(), instanceOf(PostgreSQLParseCompletePacket.class));
      }
test_case.class_method_signature: PostgreSQLComParseExecutorTest.assertNewInstance()
test_case.full_signature: @Test public void assertNewInstance()
test_case.identifier: assertNewInstance
test_case.invocations: thenReturn when getSql thenReturn when getStatementId thenReturn when getConnectionId getDeclaredField getClass getInstance setAccessible set getInstance getSchemas mockSQLParserEngine mock register getInstance assertThat next iterator execute instanceOf
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertNewInstance()
focal_class.declarator: packet
focal_class.modifier: private final
focal_class.original_string: private final PostgreSQLComParsePacket packet;
focal_class.type: PostgreSQLComParsePacket
focal_class.var_name: packet
focal_class.declarator: binaryStatementRegistry
focal_class.modifier: private final
focal_class.original_string: private final ConnectionScopeBinaryStatementRegistry binaryStatementRegistry;
focal_class.type: ConnectionScopeBinaryStatementRegistry
focal_class.var_name: binaryStatementRegistry
focal_class.file: shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/binary/parse/PostgreSQLComParseExecutor.java
focal_class.identifier: PostgreSQLComParseExecutor
focal_class.interfaces: implements CommandExecutor
focal_class.class_method_signature: PostgreSQLComParseExecutor.PostgreSQLComParseExecutor(final PostgreSQLComParsePacket packet, final BackendConnection backendConnection)
focal_class.full_signature: public  PostgreSQLComParseExecutor(final PostgreSQLComParsePacket packet, final BackendConnection backendConnection)
focal_class.identifier: PostgreSQLComParseExecutor
focal_class.modifiers: public
focal_class.parameters: (final PostgreSQLComParsePacket packet, final BackendConnection backendConnection)
focal_class.signature:  PostgreSQLComParseExecutor(final PostgreSQLComParsePacket packet, final BackendConnection backendConnection)
focal_class.class_method_signature: PostgreSQLComParseExecutor.execute()
focal_class.full_signature: @Override public Collection<DatabasePacket<?>> execute()
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Collection<DatabasePacket<?>>
focal_class.signature: Collection<DatabasePacket<?>> execute()
focal_method.body: @Override
      public Collection<DatabasePacket<?>> execute() {
          if (!packet.getSql().isEmpty()) {
              SQLStatement sqlStatement = ProxyContext.getInstance().getSchemaContexts().getSqlParserEngine().parse(packet.getSql(), true);
              binaryStatementRegistry.register(packet.getStatementId(), packet.getSql(), sqlStatement.getParameterCount(), packet.getBinaryStatementParameterTypes());
          }
          return Collections.singletonList(new PostgreSQLParseCompletePacket());
      }
focal_method.class_method_signature: PostgreSQLComParseExecutor.execute()
focal_method.full_signature: @Override public Collection<DatabasePacket<?>> execute()
focal_method.identifier: execute
focal_method.invocations: isEmpty getSql parse getSqlParserEngine getSchemaContexts getInstance getSql register getStatementId getSql getParameterCount getBinaryStatementParameterTypes singletonList
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: Collection<DatabasePacket<?>>
focal_method.signature: Collection<DatabasePacket<?>> execute()