stubby4j – Java-based HTTP stub server

I released a Java-based HTTP stub server. We are actually using it on our current project. Give it a go, perhaps it can help you too. In brief, why would you use a stub HTTP server?

  • You want to simulate responses from real server and don’t care (or cannot) to go over the network
  • You want to verify that your code makes HTTP requests with all the required parameters and/or headers
  • You want to verify that your code correctly handles HTTP error codes
  • You want to trigger response from the server based on the request parameters over HTTP or HTTPS
  • You want support for any of the available HTTP methods
  • You want to trigger multiple responses based on multiple requests on the same URI
  • You want to easily configure stub data using configuration file
  • You want to easily configure stub data at runtime, without restarting the server by making a POST to an exposed endpoint
  • You want to easily provide canned answers in your contract/integration tests
  • You don’t want to spend time coding for the above requirements and just want to concentrate on the task at hand
  • Specifiable mock responses to simulate page conditions without real data.
  • Easily swappable data config files to run different data sets and responses.
  • All-in-one stub server to handle mock data with less need to upkeep code for test generation


LaTeX – Fonts with Ligatures

Spent some time yesterday playing with LaTeX again, and to be more specific – with fonts in LaTeX. I created a resume template by applying XeLaTeX type setting. The latter allows me easily to load system fonts (both OTF and TTF) in .TEX files.

It is very similiar to CSS – XeLaTeX allows you to load system fonts simply by calling font’s name in your commands. Have a look at the following example: I declared a new command HoeflerFont which uses one of my system fonts by its name: Hoefler Text

\newcommand{\HoeflerFont}[1]{\fontspec[Alternate=1,Ligatures={TeX,Common,NoCommon, Rare}]{Hoefler Text}\selectfont #1}

I used several different fonts for my resume with ligatures enabled. Ligatures are curly little letter tails that make text style look somewhat medieval. From Wikipedia:

In writing and typography, a ligature occurs where two or more graphemes are joined as a single glyph. Ligatures usually replace consecutive characters sharing common components and are part of a more general class of glyphs called “contextual forms”, where the specific shape of a letter depends on context such as surrounding letters or proximity to the end of a line.

In order to enable ligatures, the font needs to support them. In other words, not all fonts have ligatures enabled. The following image is a screenshot of my resume using fonts supporting ligatures.