# Interface Testable

public interface Testable
Abstraction that exposes various methods useful for testing ZooKeeper

## Method Summary

Modifier and Type
Method
Description
`default void`
`closeSocket()`
Close the ClientCnxn socket for testing purposes
`void`
`injectSessionExpiration()`
Cause the ZooKeeper instance to behave as if the session expired
`void`
`queueEvent(WatchedEvent event)`
Allow an event to be inserted into the event queue

## Method Details

### injectSessionExpiration

void injectSessionExpiration()
Cause the ZooKeeper instance to behave as if the session expired

### queueEvent

void queueEvent(WatchedEvent event)
Allow an event to be inserted into the event queue

Parameters:
  `event` - event to insert

### closeSocket

default void closeSocket() throws IOException
Close the ClientCnxn socket for testing purposes

Throws:
  `IOException`