SupportDetails extends IdArray { @SuppressWarnings({ "unused", "WeakerAccess" }) public void setId( Long id ) { this.id = id; } @SuppressWarnings({ "unused", "WeakerAccess" }) // Possible external use  SupportDetails( Gene firstGene, Gene secondGene, Boolean isPositive ); @SuppressWarnings({ "unused", "WeakerAccess" }) // Possible external use  SupportDetails( Long firstGene, Long secondGene, Boolean isPositive ); Long getId(); @SuppressWarnings({ "unused", "WeakerAccess" }) // Possible external use void setId( Long id ); @Override int hashCode(); @Override boolean equals( Object obj ); @Override String toString();  }
@Test public void test() { Gene g1 = Gene.Factory.newInstance(); g1.setId( 3L ); Gene g2 = Gene.Factory.newInstance(); g2.setId( 4L ); SupportDetails sd1 = new MouseCoexpressionSupportDetailsImpl( g1, g2, true ); SupportDetails sd2 = new MouseCoexpressionSupportDetailsImpl( g1, g2, true ); sd1.addEntity( 1L ); sd2.addEntity( 2L ); sd2.removeEntity( 2L ); sd2.addEntity( 1L ); sd1.addEntity( 10L ); sd2.addEntity( 10L ); assertEquals( 2, sd2.getNumIds() ); }