Because of the initialization of a local Sone and its inserter the Sone
is currently not ready when the inserter and the modification detector
are being created. This needs to be fixed.
this.ticker = ticker;
this.lockableFingerprintProvider = lockableFingerprintProvider;
this.insertionDelay = insertionDelay;
- originalFingerprint = lockableFingerprintProvider.getFingerprint();
lastFingerprint = originalFingerprint;
}
import net.pterodactylus.sone.data.Sone;
import com.google.common.base.Ticker;
+import org.junit.Before;
import org.junit.Test;
/**
when(lockableFingerprintProvider.isLocked()).thenReturn(false);
}
+ @Before
+ public void setupOriginalFingerprint() {
+ soneModificationDetector.setFingerprint("original");
+ }
+
@Test
public void normalConstructorCanBeCalled() {
new SoneModificationDetector(lockableFingerprintProvider, insertionDelay);