use of fish.payara.ejb.http.protocol.ErrorResponse in project Payara by payara.
the class EjbOverHttpResourceTest method assertNoError.
private static void assertNoError(Response response, Status expectedStatus) {
if (response.getStatus() == 400) {
ErrorResponse error = response.readEntity(ErrorResponse.class);
fail("Remote error: " + error.toString());
}
if (response.getStatus() != expectedStatus.getStatusCode()) {
fail("Unexpected status: " + response.readEntity(String.class));
}
}
use of fish.payara.ejb.http.protocol.ErrorResponse in project Payara by payara.
the class EjbOverHttpResourceTest method invoke_ErrorNoSuchMethodWrongName.
@Test
public void invoke_ErrorNoSuchMethodWrongName() {
ErrorResponse response = invokeExpectError(mediaType, EJB_NAME, "sub", new String[] { int.class.getName(), int.class.getName() }, pack(1, 2));
assertEquals("java.lang.NoSuchMethodException", response.exceptionType);
assertEquals("No method matching sub([int, int]) found in business interface", response.message);
assertNull(response.cause);
}
Aggregations