@Test
public void toObject() throws Exception {

    final String jsonRelease = "{\n"
            + "    id: \"123\",\n"
            + "    tag: [\"tender\"],\n"
            + "    planning: {\n"
            + "        budget: {\n"
            + "            description: \"budget desc...\",\n"
            + "            amount: {\n"
            + "                amount: 10000,\n"
            + "                currency: \"USD\"\n"
            + "            }\n"
            + "        }\n"
            + "    }\n"
            + "}";
    final JsonToObject releaseJsonToObject = new ReleaseJsonToObject(jsonRelease);
    Assert.assertTrue("Object is a Release", releaseJsonToObject.toObject() instanceof Release);
    final Release release = (Release) releaseJsonToObject.toObject();
    Assert.assertEquals("IDs are the same", "123", release.getId());
    Assert.assertEquals("Check budget amount", new BigDecimal(10000),
            release.getPlanning().getBudget().getAmount().getAmount());
    Assert.assertEquals("Check budget currency", Amount.Currency.USD,
            release.getPlanning().getBudget().getAmount().getCurrency());
}