change inMemory repository and test for infile and inmemory