Example usage for org.apache.commons.lang NotImplementedException getMessage

List of usage examples for org.apache.commons.lang NotImplementedException getMessage

Introduction

In this page you can find the example usage for org.apache.commons.lang NotImplementedException getMessage.

Prototype

public String getMessage() 

Source Link

Document

Gets the combined the error message of this and any nested errors.

Usage

From source file:it.infn.mw.iam.api.scim.controller.ScimExceptionHandler.java

@ResponseStatus(code = HttpStatus.NOT_IMPLEMENTED)
@ExceptionHandler(NotImplementedException.class)
@ResponseBody/*w w  w  .j  a  v  a2s  .c  o  m*/
public ScimErrorResponse handleNotImplementedException(NotImplementedException e) {

    return buildErrorResponse(HttpStatus.NOT_IMPLEMENTED, e.getMessage());
}

From source file:gaffer.export.ExporterTest.java

@Test
public void shouldDelegateToInternalAdd() {
    // Given//from   w w w.  jav a 2 s . c  om
    final Iterable<?> values = Arrays.asList("item1", "item2");
    final User user = new User();
    final ExporterImpl exporter = new ExporterImpl();
    exporter.initialise("key", null, user);

    // When / Then
    try {
        exporter.add(values, user);
        fail("NotImplementedException expected");
    } catch (final NotImplementedException e) {
        assertEquals("_add(" + values + "," + user + ")", e.getMessage());
    }
}

From source file:gaffer.export.ExporterTest.java

@Test
public void shouldDelegateToInternalGet() {
    // Given//from   w  w w.ja  va 2s. c om
    final User user = new User();
    final int start = 0;
    final int end = 10;
    final ExporterImpl exporter = new ExporterImpl();
    exporter.initialise("key", null, user);

    // When / Then
    try {
        exporter.get(user, start, end);
        fail("NotImplementedException expected");
    } catch (final NotImplementedException e) {
        assertEquals("_get(" + user + "," + start + "," + end + ")", e.getMessage());
    }
}