I have an class, that I cannot modify, and this class contains one constructor which requires a java.io.File. I already have the information loaded from a different source and currently it is in memory. So I want to know if there is a way to mock the java.io.File object in such a way that is uses the information that is already in memory. I know I could first store the information from memory to disk, but I don't like that extra step.I have an class, that I cannot modify, and this