((Integer) original.getDetails().getCounts().get( Dataset.ANNOTATIONS)).intValue() > 0
((Long) original.getDetails().getCounts().get( Dataset.ANNOTATIONS)).intValue() > 0
    public void test_annotating_a_dataset() throws Exception    {        String name = " two rows "+System.currentTimeMillis();        String text = " two rows content "+System.currentTimeMillis();        String desc = " new description "+System.currentTimeMillis();                // Setup: original is our in-memory, used every where object.        Dataset original = new Dataset();        original.setName( name );        original = (Dataset) iPojos.createDataObject( original, null );        assertTrue(                original.getDetails().getCounts() == null                 || original.getDetails().getCounts().get( Dataset.ANNOTATIONS ) == null                );                original.setDescription( desc );                DatasetAnnotation annotation = new DatasetAnnotation();        annotation.setContent( text );        annotation.setDataset( original );        annotation = (DatasetAnnotation) iPojos.createDataObject(                annotation, null );        original = annotation.getDataset(); // TODO is this okay?                assertUniqueAnnotationCreation(name, text);                Dataset test =             (Dataset) iQuery.get( Dataset.class, original.getId().longValue() );                assertTrue( desc.equals( test.getDescription() ));        assertNotNull(original.getDetails().getCounts());        assertNotNull(original.getDetails().getCounts().get( Dataset.ANNOTATIONS ));        assertTrue(                ((Integer) original.getDetails().getCounts().get( Dataset.ANNOTATIONS)).intValue() > 0                );        System.out.println( original.getDetails().getCounts());            }