### Question:
GattCallbackLogger implements LogControl { public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) { if (loggingEnabled) { final String methodName = "onConnectionStateChange()"; int index = 1; int max = 3; logDeviceInfo(gatt, methodName, index++, max); logGattStatus(status, methodName, index++, max); logger.log(String.format(LOCALE, LOG_TEMPLATE_PREFIX + "newState: %s", SPACE, methodName, index, max, btConnectionStateMapper.mapToString(newState))); } } GattCallbackLogger(@NonNull final String logTag,
                       @NonNull final ByteFormat byteFormat); @VisibleForTesting  GattCallbackLogger(@NonNull final LogEngine logEngine,
                       @NonNull final ByteFormat byteFormat); void onPhyUpdate(BluetoothGatt gatt,
                            int txPhy,
                            int rxPhy,
                            int status); void onPhyRead(BluetoothGatt gatt,
                          int txPhy,
                          int rxPhy,
                          int status); void onConnectionStateChange(BluetoothGatt gatt,
                                        int status,
                                        int newState); void onServicesDiscovered(BluetoothGatt gatt,
                                     int status); void onCharacteristicRead(BluetoothGatt gatt,
                                     BluetoothGattCharacteristic characteristic,
                                     int status); void onCharacteristicWrite(BluetoothGatt gatt,
                                      BluetoothGattCharacteristic characteristic,
                                      int status); void onCharacteristicChanged(BluetoothGatt gatt,
                                        BluetoothGattCharacteristic characteristic); void onDescriptorRead(BluetoothGatt gatt,
                                 BluetoothGattDescriptor descriptor,
                                 int status); void onDescriptorWrite(BluetoothGatt gatt,
                                  BluetoothGattDescriptor descriptor,
                                  int status); void onReliableWriteCompleted(BluetoothGatt gatt,
                                         int status); void onReadRemoteRssi(BluetoothGatt gatt,
                                 int rssi,
                                 int status); void onMtuChanged(BluetoothGatt gatt,
                             int mtu,
                             int status); @Override boolean isLoggingEnabled(); @Override void setLoggingEnabled(final boolean enabled);  }### Answer:
@Test public void onConnectionStateChange() { cut.setLoggingEnabled(false); cut.onConnectionStateChange(gatt, 1, 1); verifyLogNotCalled(); cut.setLoggingEnabled(true); cut.onConnectionStateChange(gatt, 1, 1); verifyLogEngine().log(Mockito.anyString()); }