OpenMonBase implements OpenMon<T> { protected List<String> getLabels(Throwable throwable) { List<String> labels = new ArrayList<String>(); labels.add(Utils.getLabel(throwable)); labels.add(EXCEPTION_LABEL); return labels; }  @Override void stop(T context, Throwable throwable); @Override void exception(JoinPoint jp, Throwable throwable);  }
@Test public void testGetLabels() throws Exception { RuntimeException runtimeException = new RuntimeException("my exception"); List<String> labels = openMon.getLabels(runtimeException); assertThat(labels).containsOnly("java.lang.RuntimeException", OpenMon.EXCEPTION_LABEL); }