### Question:
PostValidator { public static HashMap<String, Object> validate(String body) throws IOException { HashMap<String, Object> input; if ( body == null) { throw Exceptions.invalidInput; } try { input = objectMapper.readValue(body, HashMap.class); } catch (Exception e) { throw Exceptions.invalidInput; } if (!input.containsKey(STATUS)) { throw PostExceptions.missingStatusParameter; } else { String status = (String)input.get(STATUS); if (status.equals("")) { throw PostExceptions.emptyStatusParameter; } else { input.put(STATUS, Jsoup.clean(status, Whitelist.simpleText())); } } if (input.containsKey(FILENAME)) { if (input.get(FILENAME) == null) { input.remove(FILENAME); } } return input; }  static HashMap<String, Object> validate(String body);  }### Answer:
@Test public void shouldHaveExceptions() throws IOException { thrown.expect(Exceptions.class); PostValidator.validate(null); }