/** * Sets up the fixture. */ @BeforeClass public static void setUp() { tenantService = createBaseTenantService(); }
/** * Verifies that the base service routes a request for retrieving * a tenant by its identifier to the corresponding <em>get</em> method. * * @param ctx The vert.x test context. */ @Test public void testGetByIdSucceeds(final TestContext ctx) { final EventBusMessage request = createRequest(TenantConstants.TenantAction.get, null); tenantService.processRequest(request).setHandler(ctx.asyncAssertSuccess(response -> { ctx.assertEquals(HttpURLConnection.HTTP_OK, response.getStatus()); ctx.assertEquals(TEST_TENANT, response.getJsonPayload().getString(TenantConstants.FIELD_PAYLOAD_TENANT_ID)); })); }