@Test
@SuppressWarnings("deprecation")
public void testGetMappedRequestUri() {

    HttpServerExchange ex = mock(HttpServerExchange.class);
    when(ex.getRequestPath()).thenReturn("/");
    when(ex.getRequestMethod()).thenReturn(HttpString.EMPTY);
    String whatUri = "/db/mycollection";
    String whereUri = "/";
    MongoRequest request = MongoRequest.init(ex, whereUri, whatUri);
    assertEquals("/db/mycollection", request.getUnmappedRequestUri());
    whatUri = "*";
    whereUri = "/";
    request = MongoRequest.init(ex, whereUri, whatUri);
    assertEquals("/", request.getUnmappedRequestUri());
    whatUri = "*";
    whereUri = "/data";
    request = MongoRequest.init(ex, whereUri, whatUri);
    assertEquals("/", request.getUnmappedRequestUri());
    whatUri = "/data";
    whereUri = "/";
    request = MongoRequest.init(ex, whereUri, whatUri);
    assertEquals("/data", request.getUnmappedRequestUri());
    whatUri = "/db/coll";
    whereUri = "/";
    request = MongoRequest.init(ex, whereUri, whatUri);
    assertEquals("/db/coll", request.getUnmappedRequestUri());
    whatUri = "/db/coll/doc";
    whereUri = "/";
    request = MongoRequest.init(ex, whereUri, whatUri);
    assertEquals("/db/coll/doc", request.getUnmappedRequestUri());
    whatUri = "/db/coll/";
    whereUri = "/";
    request = MongoRequest.init(ex, whereUri, whatUri);
    assertEquals("/db/coll", request.getUnmappedRequestUri());
    whatUri = "/db/coll////";
    whereUri = "/";
    request = MongoRequest.init(ex, whereUri, whatUri);
    assertEquals("/db/coll", request.getUnmappedRequestUri());
}