@Test
public void transformsDblPoint() {

    final Double xcoor = Math.random();
    final Double ycoor = Math.random();
    final DblPoint point = new DblPoint(xcoor, ycoor);
    final Surface ctx = TransformTest.context();
    final Point result = new Transform(ctx).transform(point);
    final double error = 1.e-6;
    MatcherAssert.assertThat(
        result.getX(), Matchers.closeTo(
            (int) (ctx.width() / 2d + ctx.scale() * xcoor
                - ctx.center().dblx() * ctx.scale()), error
        )
    );
    MatcherAssert.assertThat(
        result.getY(), Matchers.closeTo(
            (int) (ctx.height() / 2d - ctx.scale() * ycoor
                + ctx.center().dbly() * ctx.scale()), error
        )
    );
}