Buggy code:
public final class AFPriorProviderUnitTest extends BaseTest { private static final double TOLERANCE = 1.0E-4 ; @ Test ( dataProvider = "HeterozygosityProviderData" ) public void testHeterozygosityProvider ( final double h , final int useCount , final int minPloidy , final int maxPloidy ) { final double het = h // maxPloidy ; final Random rdn = Utils . getRandomGenerator ( ) ; final int [ ] plodies = new int [ useCount ] ; for ( int i = 0 ; i < useCount ; i ++ ) plodies [ i ] = ( rdn . nextInt ( ( ( maxPloidy - minPloidy ) + 1 ) ) ) + minPloidy ; final AFPriorProvider provider = new HeterozygosityAFPriorProvider ( het ) ; for ( int i = 0 ; i < useCount ; i ++ ) { final int ploidy = plodies [ i ] ; double [ ] priors = provider . forTotalPloidy ( ploidy ) ; Assert . assertNotNull ( priors ) ; Assert . assertEquals ( priors . length , ( ploidy + 1 ) ) ; Assert . assertEquals ( MathUtils . approximateLog10SumLog10 ( priors ) , 0 , AFPriorProviderUnitTest . TOLERANCE ) ; for ( int j = 0 ; j < ( priors . length ) ; j ++ ) { Assert . assertTrue ( ( ! ( Double . isNaN ( priors [ j ] ) ) ) ) ; Assert . assertTrue ( ( ( priors [ j ] ) < 0 ) ) ; if ( j > 0 ) <START_BUG> Assert . assertEquals ( priors [ j ] , ( ( Math . log10 ( het ) ) - ( Math . log10 ( j ) ) ) ) ; <END_BUG> } } } @ Test ( expectedExceptions = IllegalArgumentException . class ) public void testErrorNegativeHet ( ) throws Exception { } @ Test ( expectedExceptions = IllegalArgumentException . class ) public void testErrorTooHighHet ( ) throws Exception { } @ Test ( expectedExceptions = IllegalArgumentException . class ) public void testErrorNaNHet ( ) throws Exception { } @ Test ( expectedExceptions = IllegalArgumentException . class ) public void testErrorHeterozygosityTooHighForPloidy ( ) throws Exception { } @ Test ( dataProvider = "CustomProviderData" ) public void testCustomProvider ( final int ploidy ) { } private double [ ] hets = new double [ ] { 1.0E-5 , 0.001 , 0.1 , 0.5 , 0.99 , 0.999 } ; private int [ ] useCounts = new int [ ] { 10 , 100 , 1000 } ; private int [ ] ploidy = new int [ ] { 1 , 2 , 3 , 10 , 100 , 200 , 500 } ; @ DataProvider ( name = "CustomProviderData" ) public Object [ ] [ ] customProviderData ( ) { } @ DataProvider ( name = "HeterozygosityProviderData" ) public Object [ ] [ ] heterozygosityProviderData ( ) { } @ Test ( expectedExceptions = IllegalArgumentException . class ) public void testCustomErrorPloidy ( ) throws Exception { } @ Test ( expectedExceptions = IllegalArgumentException . class ) public void testCustomErrorNull ( ) throws Exception { } @ Test ( expectedExceptions = IllegalArgumentException . class ) public void testCustomHetError ( ) throws Exception { } @ Test ( expectedExceptions = IllegalArgumentException . class ) public void testCustomNaNError ( ) throws Exception { } @ Test ( expectedExceptions = IllegalArgumentException . class ) public void testCustomHetTooHighError ( ) throws Exception { } @ Test ( expectedExceptions = IllegalArgumentException . class ) public void testCustomPriorsError ( ) throws Exception { } }

Fix:
Assert . assertEquals ( priors [ j ] , ( ( Math . log10 ( het ) ) - ( Math . log10 ( j ) ) ) , AFPriorProviderUnitTest . TOLERANCE ) ;