Code example for AssertionFailedError

0
        if (TestFailure.ERROR.equals(status)) {
            Throwable throwable = new RemoteException(trace);
            mJUnitListener.addError(test, throwable);
        } else { 
            // TODO: is it accurate to represent the trace as AssertionFailedError? 
            mJUnitListener.addFailure(test, new AssertionFailedError(trace));
        } 
    } 
 
    /** 
     * {@inheritDoc} 
     */ 
    @Override 
    public void testRunEnded(long elapsedTime, Map<String, String> runMetrics) {
       // TODO: no run ended method on TestListener - would be good to propagate the elaspedTime 
       // info up 
       Log.i(LOG_TAG, String.format("run ended %d ms", elapsedTime));
    } 
 
    /** 
     * {@inheritDoc}