@@ -116,10 +116,7 @@ void corruptValueIsRecoveredFromWal() throws Exception {
116116 ValueStore .NAMESPACE_CACHE_SIZE , ValueStore .NAMESPACE_ID_CACHE_SIZE ,
117117 ValueStoreWAL .open (config ))) {
118118 NativeValue v = store .getValue (id );
119- assertThat (v ).isInstanceOf (CorruptValue .class );
120- CorruptValue cv = (CorruptValue ) v ;
121- assertThat (cv .getRecovered ()).isNotNull ();
122- assertThat (cv .getRecovered ().stringValue ()).isEqualTo (label );
119+ assertThat (v .stringValue ()).isEqualTo (label );
123120 }
124121 }
125122
@@ -291,10 +288,8 @@ void corruptIriIsRecoveredFromWal() throws Exception {
291288 ValueStore .VALUE_ID_CACHE_SIZE ,
292289 ValueStore .NAMESPACE_CACHE_SIZE , ValueStore .NAMESPACE_ID_CACHE_SIZE , ValueStoreWAL .open (config ))) {
293290 NativeValue v = store .getValue (id );
294- assertThat (v ).isInstanceOf (CorruptValue .class );
295- CorruptValue cv = (CorruptValue ) v ;
296- assertThat (cv .getRecovered ()).isNotNull ();
297- assertThat (cv .getRecovered ().stringValue ()).isEqualTo (iri );
291+ assertThat (v .toString ()).isEqualTo (iri );
292+
298293 }
299294 }
300295
@@ -337,10 +332,7 @@ void corruptBNodeIsRecoveredFromWal() throws Exception {
337332 ValueStore .VALUE_ID_CACHE_SIZE ,
338333 ValueStore .NAMESPACE_CACHE_SIZE , ValueStore .NAMESPACE_ID_CACHE_SIZE , ValueStoreWAL .open (config ))) {
339334 NativeValue v = store .getValue (id );
340- assertThat (v ).isInstanceOf (CorruptValue .class );
341- CorruptValue cv = (CorruptValue ) v ;
342- assertThat (cv .getRecovered ()).isNotNull ();
343- assertThat (cv .getRecovered ().stringValue ()).isEqualTo (bnodeId );
335+ assertThat (v .stringValue ()).isEqualTo (bnodeId );
344336 }
345337 }
346338
@@ -439,10 +431,7 @@ private void runCorruptAndRecoverLiteralTest(Literal lit) throws Exception {
439431 ValueStore .NAMESPACE_CACHE_SIZE , ValueStore .NAMESPACE_ID_CACHE_SIZE ,
440432 ValueStoreWAL .open (config ))) {
441433 NativeValue v = store .getValue (id );
442- assertThat (v ).isInstanceOf (CorruptValue .class );
443- CorruptValue cv = (CorruptValue ) v ;
444- assertThat (cv .getRecovered ()).isNotNull ();
445- assertThat (cv .getRecovered ().stringValue ()).isEqualTo (lit .stringValue ());
434+ assertThat (v .stringValue ()).isEqualTo (lit .stringValue ());
446435 }
447436 }
448437}
0 commit comments