use of fish.payara.ejb.http.protocol.LookupResponse in project Payara by payara.
the class EjbOverHttpResourceTest method lookup_SuccessFullName.
@Test
public void lookup_SuccessFullName() {
LookupResponse response = lookupExpectSuccess(mediaType, "java:global/myapp/CalculatorBean!" + RemoteCalculator.class.getName());
assertEquals(RemoteCalculator.class.getName(), response.typeName);
assertEquals("Stateless", response.kind);
}
use of fish.payara.ejb.http.protocol.LookupResponse in project Payara by payara.
the class EjbOverHttpResourceTest method lookupExpectSuccess.
private static LookupResponse lookupExpectSuccess(String mediaType, String jndiName) {
Entity<LookupRequest> entity = lookupBody(mediaType, jndiName);
try (Response response = target.path("jndi/lookup").request(mediaType).buildPost(entity).invoke()) {
assertNoError(response, Status.CREATED);
assertThat(response.getLocation().getPath(), endsWith("/jndi/invoke"));
return response.readEntity(LookupResponse.class);
}
}
use of fish.payara.ejb.http.protocol.LookupResponse in project Payara by payara.
the class EjbOverHttpResourceTest method lookup_SuccessInterfaceName.
@Test
public void lookup_SuccessInterfaceName() {
LookupResponse response = lookupExpectSuccess(mediaType, EJB_NAME);
assertEquals(RemoteCalculator.class.getName(), response.typeName);
assertEquals("Stateless", response.kind);
}
Aggregations