Helper to validate calls to the storage exception handler. @param called Whether or not SEH should have been called.
(final boolean called)
| 110 | * @param called Whether or not SEH should have been called. |
| 111 | */ |
| 112 | protected void validateSEH(final boolean called) { |
| 113 | if (called) { |
| 114 | verify(tsdb, times(1)).getStorageExceptionHandler(); |
| 115 | if (handler != null) { |
| 116 | verify(handler, times(1)).handleError((IncomingDataPoint)any(), |
| 117 | (Exception)any()); |
| 118 | } |
| 119 | } else { |
| 120 | verify(tsdb, never()).getStorageExceptionHandler(); |
| 121 | if (handler != null) { |
| 122 | verify(handler, never()).handleError((IncomingDataPoint)any(), |
| 123 | (Exception)any()); |
| 124 | } |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | // Helper to validate all the counters per call. |
| 129 | protected void validateCounters( |
no test coverage detected