Simplify test logic. Remove useless file copy.