@Test @SuppressWarnings("deprecation") public void testGetMappedRequestUri2() { HttpServerExchange ex = mock(HttpServerExchange.class); when(ex.getRequestPath()).thenReturn("/x"); when(ex.getRequestMethod()).thenReturn(HttpString.EMPTY); String whatUri = "/db/mycollection"; String whereUri = "/"; MongoRequest request = MongoRequest.init(ex, whereUri, whatUri); assertEquals("/db/mycollection/x", request.getUnmappedRequestUri()); whatUri = "*"; whereUri = "/"; request = MongoRequest.init(ex, whereUri, whatUri); assertEquals("/x", request.getUnmappedRequestUri()); whatUri = "db"; whereUri = "/"; request = MongoRequest.init(ex, whereUri, whatUri); assertEquals("/db/x", request.getUnmappedRequestUri()); whatUri = "db/coll"; whereUri = "/"; request = MongoRequest.init(ex, whereUri, whatUri); assertEquals("/db/coll/x", request.getUnmappedRequestUri()); }
public static BsonRequest init(HttpServerExchange exchange) { var ret = new BsonRequest(exchange); try { ret.injectContent(); } catch (Throwable ieo) { ret.setInError(true); } return ret; }
BsonRequest extends ServiceRequest<BsonValue> { public static BsonRequest init(HttpServerExchange exchange) { var ret = new BsonRequest(exchange); try { ret.injectContent(); } catch (Throwable ieo) { ret.setInError(true); } return ret; } }
BsonRequest extends ServiceRequest<BsonValue> { public static BsonRequest init(HttpServerExchange exchange) { var ret = new BsonRequest(exchange); try { ret.injectContent(); } catch (Throwable ieo) { ret.setInError(true); } return ret; } protected  BsonRequest(HttpServerExchange exchange); }
BsonRequest extends ServiceRequest<BsonValue> { public static BsonRequest init(HttpServerExchange exchange) { var ret = new BsonRequest(exchange); try { ret.injectContent(); } catch (Throwable ieo) { ret.setInError(true); } return ret; } protected  BsonRequest(HttpServerExchange exchange); static BsonRequest init(HttpServerExchange exchange); static BsonRequest of(HttpServerExchange exchange); void injectContent(); }
BsonRequest extends ServiceRequest<BsonValue> { public static BsonRequest init(HttpServerExchange exchange) { var ret = new BsonRequest(exchange); try { ret.injectContent(); } catch (Throwable ieo) { ret.setInError(true); } return ret; } protected  BsonRequest(HttpServerExchange exchange); static BsonRequest init(HttpServerExchange exchange); static BsonRequest of(HttpServerExchange exchange); void injectContent();  }