test_class.file: persistence-mongodb/src/test/java/org/devgateway/ocds/persistence/mongo/spring/json2object/ReleaseJsonToObjectTest.java
test_class.identifier: ReleaseJsonToObjectTest
test_case.body: @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());
      }
test_case.class_method_signature: ReleaseJsonToObjectTest.toObject()
test_case.full_signature: @Test public void toObject()
test_case.identifier: toObject
test_case.invocations: assertTrue toObject toObject assertEquals getId assertEquals getAmount getAmount getBudget getPlanning assertEquals getCurrency getAmount getBudget getPlanning
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void toObject()
focal_class.declarator: release
focal_class.modifier: private
focal_class.original_string: private Release release;
focal_class.type: Release
focal_class.var_name: release
focal_class.file: persistence-mongodb/src/main/java/org/devgateway/ocds/persistence/mongo/spring/json2object/ReleaseJsonToObject.java
focal_class.identifier: ReleaseJsonToObject
focal_class.class_method_signature: ReleaseJsonToObject.ReleaseJsonToObject(final String jsonObject)
focal_class.full_signature: public  ReleaseJsonToObject(final String jsonObject)
focal_class.identifier: ReleaseJsonToObject
focal_class.modifiers: public
focal_class.parameters: (final String jsonObject)
focal_class.signature:  ReleaseJsonToObject(final String jsonObject)
focal_class.class_method_signature: ReleaseJsonToObject.ReleaseJsonToObject(final InputStream inputStream)
focal_class.full_signature: public  ReleaseJsonToObject(final InputStream inputStream)
focal_class.identifier: ReleaseJsonToObject
focal_class.modifiers: public
focal_class.parameters: (final InputStream inputStream)
focal_class.signature:  ReleaseJsonToObject(final InputStream inputStream)
focal_class.class_method_signature: ReleaseJsonToObject.ReleaseJsonToObject(final File file)
focal_class.full_signature: public  ReleaseJsonToObject(final File file)
focal_class.identifier: ReleaseJsonToObject
focal_class.modifiers: public
focal_class.parameters: (final File file)
focal_class.signature:  ReleaseJsonToObject(final File file)
focal_class.class_method_signature: ReleaseJsonToObject.toObject()
focal_class.full_signature: @Override public Release toObject()
focal_class.identifier: toObject
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Release
focal_class.signature: Release toObject()
focal_class.superclass: extends AbstractJsonToObject<Release>
focal_method.body: @Override
      public Release toObject() throws IOException {
          if (release == null) {
              // Transform JSON String to a Release Object
              release = this.mapper.readValue(this.jsonObject, Release.class);
          }
  
          return release;
      }
focal_method.class_method_signature: ReleaseJsonToObject.toObject()
focal_method.full_signature: @Override public Release toObject()
focal_method.identifier: toObject
focal_method.invocations: readValue
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: Release
focal_method.signature: Release toObject()