(String[] args)
| 8 | } |
| 9 | |
| 10 | public static void main(String[] args) { |
| 11 | Cache cache = new Cache(); |
| 12 | for (int i = 0; i < 20; i++) { |
| 13 | String query = "query" + i; |
| 14 | cache.insertResults(query, generateResults(i)); |
| 15 | if (i == 9 || i == 16 || i == 19) { |
| 16 | cache.getResults("query" + 2); |
| 17 | cache.getResults("query" + 6); |
| 18 | cache.getResults("query" + 9); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | for (int i = 0; i < 30; i++) { |
| 23 | String query = "query" + i; |
| 24 | String[] results = cache.getResults(query); |
| 25 | System.out.print(query + ": "); |
| 26 | if (results == null) { |
| 27 | System.out.print("null"); |
| 28 | } else { |
| 29 | for (String s : results) { |
| 30 | System.out.print(s + ", "); |
| 31 | } |
| 32 | } |
| 33 | System.out.println(""); |
| 34 | } |
| 35 | } |
| 36 | } |
nothing calls this directly
no test coverage detected