@Test(expected = RuntimeException.class)
public void jsonSerializationProblem() throws Exception {

  when(mapper.writer()).thenReturn(writer);
  when(writer.writeValueAsString(any())).thenThrow(JsonProcessingException.class);
  underTest = new KafkaPatchSetEmitter("kafka-agent-topic", kafkaProducer, mapper);
  underTest.emit(new PatchSet("road1", new ArrayList<>()));
}