// Path: sample/src/ca/uwaterloo/ece/qhanam/practice/lru/LRUCache.java
// public class LRUCache {
// 
//     Hashtable<Integer, Node> hash;
//     LRUList list;
//     int capacity;
//     int currentLoad;
//     
//     public LRUCache(int capacity) {
//         hash = new Hashtable<Integer, Node>(capacity);
//         list = new LRUList();
//         this.capacity = capacity;
//         this.currentLoad = 0;
//     }
//     
//     public int get(int key) {
//         /* Get the node from the hash table. */
//         Node n = hash.get(new Integer(key));
//         if(n == null) return -1;
//         
//         /* Set the node as most recently used. */
//         list.access(n);
//         
//         return n.value;
//     }
//     
//     public void set(int key, int value) {
//         Integer k = new Integer(key);
//         Node n;
//         
//         /* Might already be in the list. */
//         n = hash.get(new Integer(key));
//         if(n != null){
//             n.value = value;
// 
//             /* Set the node as most recently used. */
//             list.access(n);
//         }
//         else{
//             n = new Node(k, value);
//             
//             /* We might need to make room. */
//             currentLoad--; /* Bug Here (this statement should be deleted. */
//             if(currentLoad == capacity){
//             	Node lru = list.remove();
//                 hash.remove(lru.key);
//             }
//             else{
//                 currentLoad++;
//             }
//             
//             /* Set the node as the most recently used. */
//             hash.put(k, n);
//             list.insert(n);
//         }
//     }
// }


import static org.junit.Assert.*;
import org.junit.Test;
import ca.uwaterloo.ece.qhanam.practice.lru.LRUCache;
package ca.uwaterloo.ece.qhanam.localization;




public class TestLRU {

	@Test
	public void testEmpty() {
// Path: sample/src/ca/uwaterloo/ece/qhanam/practice/lru/LRUCache.java
// public class LRUCache {
// 
//     Hashtable<Integer, Node> hash;
//     LRUList list;
//     int capacity;
//     int currentLoad;
//     
//     public LRUCache(int capacity) {
//         hash = new Hashtable<Integer, Node>(capacity);
//         list = new LRUList();
//         this.capacity = capacity;
//         this.currentLoad = 0;
//     }
//     
//     public int get(int key) {
//         /* Get the node from the hash table. */
//         Node n = hash.get(new Integer(key));
//         if(n == null) return -1;
//         
//         /* Set the node as most recently used. */
//         list.access(n);
//         
//         return n.value;
//     }
//     
//     public void set(int key, int value) {
//         Integer k = new Integer(key);
//         Node n;
//         
//         /* Might already be in the list. */
//         n = hash.get(new Integer(key));
//         if(n != null){
//             n.value = value;
// 
//             /* Set the node as most recently used. */
//             list.access(n);
//         }
//         else{
//             n = new Node(k, value);
//             
//             /* We might need to make room. */
//             currentLoad--; /* Bug Here (this statement should be deleted. */
//             if(currentLoad == capacity){
//             	Node lru = list.remove();
//                 hash.remove(lru.key);
//             }
//             else{
//                 currentLoad++;
//             }
//             
//             /* Set the node as the most recently used. */
//             hash.put(k, n);
//             list.insert(n);
//         }
//     }
// }


// Path: sample/test/ca/uwaterloo/ece/qhanam/localization/TestLRU.java
import static org.junit.Assert.*;
import org.junit.Test;
import ca.uwaterloo.ece.qhanam.practice.lru.LRUCache;

package ca.uwaterloo.ece.qhanam.localization;




public class TestLRU {

	@Test
	public void testEmpty() {
		LRUCache cache = new LRUCache(2);