### Question:
ScanCallbackLogger implements LogControl { public void onScanResult(int callbackType, ScanResult result) { if (loggingEnabled) { final String methodName = "onScanResult()"; int index = 1; int max = 1; logger.log(String.format(LOCALE, LOG_TEMPLATE_PREFIX + "Type: %s Result: %s", SPACE, methodName, index, max, scanCallbackTypeMapper.mapToString(callbackType), scanResultToStringMapper.asString(result))); } } ScanCallbackLogger(@NonNull final String logTag); @VisibleForTesting  ScanCallbackLogger(@NonNull final LogEngine logEngine); void onScanResult(int callbackType,
                             ScanResult result); void onBatchScanResults(List<ScanResult> results); void onScanFailed(int errorCode); boolean isLoggingEnabled(); @Override void setLoggingEnabled(final boolean enabled);  }### Answer:
@Test public void onScanResult() { final ScanResult scanResult = MockScanResultFactory.createScanResult(); cut.setLoggingEnabled(false); cut.onScanResult(1, scanResult); verifyLogNotCalled(); cut.setLoggingEnabled(true); cut.onScanResult(1, scanResult); verifyLogEngine().log(anyString()); }