BluetoothSocketIoThread extends Thread { public int getBufferSize() { return mBufferSizeInBytes; } BluetoothSocketIoThread(BluetoothSocket socket, Listener listener); BluetoothSocket getSocket(); @Nullable PeerProperties getPeerProperties(); void setPeerProperties(PeerProperties peerProperties); void setExitThreadAfterRead(boolean exit); int getBufferSize(); void setBufferSize(int bufferSizeInBytes); @Override void run(); boolean write(byte[] bytes); synchronized void close(boolean closeStreams, boolean closeSocket);  }
@Test public void bluetoothSocketIoThreadConstructor() throws Exception { BluetoothSocketIoThread bluetoothSocketIoThread = new BluetoothSocketIoThread(mMockBluetoothSocket, mMockListener); assertThat("The bluetoothSocketIoThread is properly created", bluetoothSocketIoThread, is(notNullValue())); assertThat("The BufferSizeInBytes is properly initialized", bluetoothSocketIoThread.getBufferSize(), is(BluetoothSocketIoThread.DEFAULT_BUFFER_SIZE_IN_BYTES)); }