RepositoryErrorBundle implements ErrorBundle { @Override public String getErrorMessage() { String message = ""; if( null != this.exception ) { message = this.exception.getMessage(); } return message; } RepositoryErrorBundle( Exception exception ); @Override Exception getException(); @Override String getErrorMessage();  }
@Test public void testGetErrorMessageInteraction() { repositoryErrorBundle.getErrorMessage(); verify( mockException ).getMessage(); }