@Test public void exceptionIsThrownForWronglyConstructedJsonDictionary_3() { final Map<String, Object> eventMap = ImmutableMap.of("output_file", newArrayList()); assertThatExceptionOfType(RuntimeException.class).isThrownBy(() -> OutputFileEvent.from(eventMap)); }
public static OutputFileEvent from(final Map<String, Object> eventMap) { final List<?> arguments = (List<?>) eventMap.get("output_file"); final URI path = Events.toFileUri((String) arguments.get(0)); return new OutputFileEvent(path); }
OutputFileEvent { public static OutputFileEvent from(final Map<String, Object> eventMap) { final List<?> arguments = (List<?>) eventMap.get("output_file"); final URI path = Events.toFileUri((String) arguments.get(0)); return new OutputFileEvent(path); } }
OutputFileEvent { public static OutputFileEvent from(final Map<String, Object> eventMap) { final List<?> arguments = (List<?>) eventMap.get("output_file"); final URI path = Events.toFileUri((String) arguments.get(0)); return new OutputFileEvent(path); } OutputFileEvent(final URI path); }
OutputFileEvent { public static OutputFileEvent from(final Map<String, Object> eventMap) { final List<?> arguments = (List<?>) eventMap.get("output_file"); final URI path = Events.toFileUri((String) arguments.get(0)); return new OutputFileEvent(path); } OutputFileEvent(final URI path); static OutputFileEvent from(final Map<String, Object> eventMap); Optional<URI> getPath(); @Override boolean equals(final Object obj); @Override int hashCode(); }
OutputFileEvent { public static OutputFileEvent from(final Map<String, Object> eventMap) { final List<?> arguments = (List<?>) eventMap.get("output_file"); final URI path = Events.toFileUri((String) arguments.get(0)); return new OutputFileEvent(path); } OutputFileEvent(final URI path); static OutputFileEvent from(final Map<String, Object> eventMap); Optional<URI> getPath(); @Override boolean equals(final Object obj); @Override int hashCode();  }