They both act like filters. The coffee filter makes sure that coffee doesn't go in the drink and the kidney makes sure solids don't pass by.
 
        
                    
             
        
        
        
It would most likely die because it needs nitrogen , sunlight , and water , basic things that you can't exactly find in space....