test_class.declarator: view
test_class.modifier: @Mock
test_class.original_string: @Mock ErrorPopupPresenter.View view;
test_class.type: ErrorPopupPresenter.View
test_class.var_name: view
test_class.declarator: presenter
test_class.modifier: private
test_class.original_string: private ClientRuntimeErrorPopupPresenter presenter;
test_class.type: ClientRuntimeErrorPopupPresenter
test_class.var_name: presenter
test_class.file: dashbuilder-client/dashbuilder-widgets/src/test/java/org/dashbuilder/client/widgets/common/ClientRuntimeErrorPopupPresenterTest.java
test_class.identifier: ClientRuntimeErrorPopupPresenterTest
test_case.body: @Test
      public void testShowMessage() throws Exception {
          final ClientRuntimeError error = mock(ClientRuntimeError.class);
          final String message = "message";
          final Throwable cause = mock(Throwable.class);
          final String localizedMessage = "localizedMessage";
          when(cause.getLocalizedMessage()).thenReturn(localizedMessage);
          when(error.getMessage()).thenReturn(message);
          when(error.getRootCause()).thenReturn(cause);
          presenter.showMessage(error);
          verify(view, times(1)).showMessage(anyString(), any(Command.class), any(Command.class));
      }
test_case.class_method_signature: ClientRuntimeErrorPopupPresenterTest.testShowMessage()
test_case.full_signature: @Test public void testShowMessage()
test_case.identifier: testShowMessage
test_case.invocations: mock mock thenReturn when getLocalizedMessage thenReturn when getMessage thenReturn when getRootCause showMessage showMessage verify times anyString any any
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testShowMessage()
focal_class.file: dashbuilder-client/dashbuilder-widgets/src/main/java/org/dashbuilder/client/widgets/common/ClientRuntimeErrorPopupPresenter.java
focal_class.identifier: ClientRuntimeErrorPopupPresenter
focal_class.class_method_signature: ClientRuntimeErrorPopupPresenter.ClientRuntimeErrorPopupPresenter(View view)
focal_class.full_signature: @Inject public  ClientRuntimeErrorPopupPresenter(View view)
focal_class.identifier: ClientRuntimeErrorPopupPresenter
focal_class.modifiers: @Inject public
focal_class.parameters: (View view)
focal_class.signature:  ClientRuntimeErrorPopupPresenter(View view)
focal_class.class_method_signature: ClientRuntimeErrorPopupPresenter.showMessage( final ClientRuntimeError error)
focal_class.full_signature: public void showMessage( final ClientRuntimeError error)
focal_class.identifier: showMessage
focal_class.modifiers: public
focal_class.parameters: ( final ClientRuntimeError error)
focal_class.return: void
focal_class.signature: void showMessage( final ClientRuntimeError error)
focal_class.superclass: extends ErrorPopupPresenter
focal_method.body: public void showMessage( final ClientRuntimeError error) {
          StringBuilder result = new StringBuilder(DataSetExplorerConstants.INSTANCE.error());
          
          if (error != null) {
              final String message = error.getMessage();
              Throwable t = error.getRootCause();
              String localizedMessage = t != null ? t.getLocalizedMessage() : null;
              result = new StringBuilder(message);
              if (localizedMessage != null) {
                  result.append(" ").append(DataSetExplorerConstants.INSTANCE.cause()).
                          append(": ").append(localizedMessage);
              }
          }
          
          showMessage(result.toString());
      }
focal_method.class_method_signature: ClientRuntimeErrorPopupPresenter.showMessage( final ClientRuntimeError error)
focal_method.full_signature: public void showMessage( final ClientRuntimeError error)
focal_method.identifier: showMessage
focal_method.invocations: error getMessage getRootCause getLocalizedMessage append append append append cause showMessage toString
focal_method.modifiers: public
focal_method.parameters: ( final ClientRuntimeError error)
focal_method.return: void
focal_method.signature: void showMessage( final ClientRuntimeError error)