ByteStream contentByteStream = new ByteStream();
contentByteStream.setData(content.getBytes());
object.setData(contentByteStream);
// mock ByteStreamManager
ByteStreamManager byteStreamManager = mock(ByteStreamManager.class);
when(byteStreamManager.store(null, content.getBytes())).thenReturn("myPid");
// execute test
DigitalObjectManager digitalObjectManager = new DigitalObjectManager();
digitalObjectManager.setByteStreamManager(byteStreamManager);
digitalObjectManager.moveDataToStorage(object);