test_class.declarator: connection
test_class.original_string: Connection connection;
test_class.type: Connection
test_class.var_name: connection
test_class.declarator: socket
test_class.modifier: @Mock
test_class.original_string: @Mock
    Socket socket;
test_class.type: Socket
test_class.var_name: socket
test_class.declarator: inetSocketAddress
test_class.modifier: @Mock
test_class.original_string: @Mock
    InetSocketAddress inetSocketAddress;
test_class.type: InetSocketAddress
test_class.var_name: inetSocketAddress
test_class.declarator: redisOutputStream
test_class.modifier: @Mock
test_class.original_string: @Mock
    RedisStreamWriter redisOutputStream;
test_class.type: RedisStreamWriter
test_class.var_name: redisOutputStream
test_class.file: imcache-redis/src/test/java/com/cetsoft/imcache/redis/client/ConnectionTest.java
test_class.identifier: ConnectionTest
test_case.body: @Test
    public void close() throws ConnectionException, IOException {
      doReturn(true).when(connection).isConnected();
      doNothing().when(socket).close();
      doNothing().when(redisOutputStream).flush();
      connection.close();
      verify(socket).close();
    }
test_case.class_method_signature: ConnectionTest.close()
test_case.full_signature: @Test public void close()
test_case.identifier: close
test_case.invocations: isConnected when doReturn close when doNothing flush when doNothing close close verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void close()
focal_class.declarator: DEFAULT_TIMEOUT = 100
focal_class.modifier: public final static
focal_class.original_string: public final static int DEFAULT_TIMEOUT = 100;
focal_class.type: int
focal_class.var_name: DEFAULT_TIMEOUT
focal_class.declarator: DEFAULT_SOCKET_TIMEOUT = 100
focal_class.modifier: public final static
focal_class.original_string: public final static int DEFAULT_SOCKET_TIMEOUT = 100;
focal_class.type: int
focal_class.var_name: DEFAULT_SOCKET_TIMEOUT
focal_class.declarator: DEFAULT_HOST = "localhost"
focal_class.modifier: public static final
focal_class.original_string: public static final String DEFAULT_HOST = "localhost";
focal_class.type: String
focal_class.var_name: DEFAULT_HOST
focal_class.declarator: DEFAULT_PORT = 6379
focal_class.modifier: public static final
focal_class.original_string: public static final int DEFAULT_PORT = 6379;
focal_class.type: int
focal_class.var_name: DEFAULT_PORT
focal_class.declarator: host
focal_class.modifier: private final
focal_class.original_string: private final String host;
focal_class.type: String
focal_class.var_name: host
focal_class.declarator: port
focal_class.modifier: private final
focal_class.original_string: private final int port;
focal_class.type: int
focal_class.var_name: port
focal_class.declarator: timeout
focal_class.modifier: private final
focal_class.original_string: private final int timeout;
focal_class.type: int
focal_class.var_name: timeout
focal_class.declarator: socketTimeout
focal_class.modifier: private final
focal_class.original_string: private final int socketTimeout;
focal_class.type: int
focal_class.var_name: socketTimeout
focal_class.declarator: socket
focal_class.original_string: Socket socket;
focal_class.type: Socket
focal_class.var_name: socket
focal_class.file: imcache-redis/src/main/java/com/cetsoft/imcache/redis/client/Connection.java
focal_class.identifier: Connection
focal_class.class_method_signature: Connection.Connection()
focal_class.full_signature: public  Connection()
focal_class.identifier: Connection
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  Connection()
focal_class.class_method_signature: Connection.Connection(final String host)
focal_class.full_signature: public  Connection(final String host)
focal_class.identifier: Connection
focal_class.modifiers: public
focal_class.parameters: (final String host)
focal_class.signature:  Connection(final String host)
focal_class.class_method_signature: Connection.Connection(final String host, final int port)
focal_class.full_signature: public  Connection(final String host, final int port)
focal_class.identifier: Connection
focal_class.modifiers: public
focal_class.parameters: (final String host, final int port)
focal_class.signature:  Connection(final String host, final int port)
focal_class.class_method_signature: Connection.Connection(final String host, final int port, final int timeout, final int socketTimeout)
focal_class.full_signature: public  Connection(final String host, final int port, final int timeout, final int socketTimeout)
focal_class.identifier: Connection
focal_class.modifiers: public
focal_class.parameters: (final String host, final int port, final int timeout, final int socketTimeout)
focal_class.signature:  Connection(final String host, final int port, final int timeout, final int socketTimeout)
focal_class.class_method_signature: Connection.getTimeout()
focal_class.full_signature: public int getTimeout()
focal_class.identifier: getTimeout
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getTimeout()
focal_class.class_method_signature: Connection.getSocketTimeout()
focal_class.full_signature: public int getSocketTimeout()
focal_class.identifier: getSocketTimeout
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getSocketTimeout()
focal_class.class_method_signature: Connection.getHost()
focal_class.full_signature: public String getHost()
focal_class.identifier: getHost
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getHost()
focal_class.class_method_signature: Connection.getPort()
focal_class.full_signature: public int getPort()
focal_class.identifier: getPort
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getPort()
focal_class.class_method_signature: Connection.isConnected()
focal_class.full_signature: public boolean isConnected()
focal_class.identifier: isConnected
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isConnected()
focal_class.class_method_signature: Connection.open()
focal_class.full_signature: public void open()
focal_class.identifier: open
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void open()
focal_class.class_method_signature: Connection.createSocket()
focal_class.full_signature: protected Socket createSocket()
focal_class.identifier: createSocket
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: Socket
focal_class.signature: Socket createSocket()
focal_class.class_method_signature: Connection.getInetSocketAddress()
focal_class.full_signature: protected InetSocketAddress getInetSocketAddress()
focal_class.identifier: getInetSocketAddress
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: InetSocketAddress
focal_class.signature: InetSocketAddress getInetSocketAddress()
focal_class.class_method_signature: Connection.close()
focal_class.full_signature: public void close()
focal_class.identifier: close
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: Connection.getStreamWriter()
focal_class.full_signature: public RedisStreamWriter getStreamWriter()
focal_class.identifier: getStreamWriter
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: RedisStreamWriter
focal_class.signature: RedisStreamWriter getStreamWriter()
focal_class.class_method_signature: Connection.getStreamReader()
focal_class.full_signature: public RedisStreamReader getStreamReader()
focal_class.identifier: getStreamReader
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: RedisStreamReader
focal_class.signature: RedisStreamReader getStreamReader()
focal_method.body: public void close() throws ConnectionException {
      if (isConnected()) {
        try {
          socket.close();
        } catch (IOException ex) {
          throw new ConnectionException(ex);
        }
      }
    }
focal_method.class_method_signature: Connection.close()
focal_method.full_signature: public void close()
focal_method.identifier: close
focal_method.invocations: isConnected close
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void close()