@Test public void testLong() { Entity e = new Entity(jCas); e.setInternalId(123456789); e.addToIndexes(); Feature f = e.getType().getFeatureByBaseName("internalId"); Object o = FeatureUtils.featureToObject(f, e); assertTrue(o instanceof Long); assertEquals(new Long(123456789), (Long) o); }
@Test public void testLong() { Entity e = new Entity(jCas); e.setInternalId(12345); e.addToIndexes(); Feature feature = e.getType().getFeatureByBaseName("internalId"); NewFeatureUtils.setPrimitive(e, feature, 54321); assertEquals(54321, e.getLongValue(feature)); }