question: private void serializable ( final IsolationLevels level ) throws Exception { clear ( store ) ; final ValueFactory vf = store . getValueFactory ( ) ; final IRI subj = vf . createIRI ( "http://test#s" ) ; final IRI pred = vf . createIRI ( "http://test#p" ) ; RepositoryConnection prep = store . getConnection ( ) ; try { prep . begin ( level ) ; prep . add ( subj , pred , vf . createLiteral ( 1 ) ) ; prep . commit ( ) ; } finally { prep . close ( ) ; } final CountDownLatch start = new CountDownLatch ( 2 ) ; final CountDownLatch observed = new CountDownLatch ( 2 ) ; Thread t1 = incrementBy ( start , observed , level , vf , subj , pred , 3 ) ; Thread t2 = incrementBy ( start , observed , level , vf , subj , pred , 5 ) ; t2 . start ( ) ; t1 . start ( ) ; t2 . join ( ) ; t1 . join ( ) ; assertNotFailed ( ) ; RepositoryConnection check = store . getConnection ( ) ; try { check . begin ( level ) ; Literal lit = readLiteral ( check , subj , pred ) ; int val = lit . intValue ( ) ; if ( val != 4 && val != 6 ) { assertEquals ( 9 , val ) ; } check . commit ( ) ; } finally { check . close ( ) ; } }
target:  Two transactions read a value and replace it