### Question:
DefaultOulipoMachine implements OulipoMachine { @Override public void moveVariant(long to, VariantSpan variantSpan) throws MalformedSpanException, IOException { assertGreaterThanZero(to); assertSpanNotNull(variantSpan); vStream.move(to, variantSpan); oStream.move(to, variantSpan); if (writeDocFile) { documentBuilder.moveVariant(to, variantSpan); } } DefaultOulipoMachine(StreamLoader stream, RemoteFileManager remoteFileManager, String documentHash,
			Key privateKey); static DefaultOulipoMachine createWritableMachine(StreamLoader loader, RemoteFileManager remoteFileManager,
			String documentHash); @Override InvariantSpan append(String text); @Override void applyOverlays(VariantSpan variantSpan, Set<Overlay> links); @Override void copyVariant(long to, VariantSpan variantSpan); @Override void deleteVariant(VariantSpan variantSpan); @Override void flush(); @Override String getDocumentHash(); @Override List<Invariant> getInvariants(); @Override List<Invariant> getInvariants(VariantSpan variantSpan); @Override String getText(InvariantSpan invariantSpan); @Override List<VariantSpan> getVariantSpans(InvariantSpan invariantSpan); @Override Invariant index(long characterPosition); @Override void insert(long to, String text); @Override void insertEncrypted(long to, String text); @Override void loadDocument(String hash); @Override void moveVariant(long to, VariantSpan variantSpan); @Override void putInvariant(long to, Invariant invariant); @Override void putOverlay(long to, OverlayStream overlayStream); @Override void swapVariants(VariantSpan v1, VariantSpan v2); @Override void toggleOverlay(VariantSpan variantSpan, Overlay link);  }### Answer:
@Test public void moveVariant() throws Exception { DefaultOulipoMachine machine = DefaultOulipoMachine.createWritableMachine(streamLoader, new MockRemoteFileManager(), documentHash); machine.insert(1, "My first document"); assertEquals("My first document", getText(machine)); machine.moveVariant(1, new VariantSpan(4, 6)); assertEquals("first My document", getText(machine)); }