### Question:
Song { public static Song fromJson(final String json) { try { return OBJECT_MAPPER.readValue(json, Song.class); } catch (JsonParseException | JsonMappingException e) { throw new IllegalArgumentException("Song de-serialisation failed: " + json, e); } catch (IOException e) { throw new RuntimeException(e); } }  static Song fromJson(final String json); String toJson();  }### Answer:
@Test public void testDeserialisationWorksForCorrectFormat() { final Song song = Song.fromJson(SONG_JSON); assertEquals(SONG.getId(), song.getId()); assertEquals(SONG.getAuthorID(), song.getAuthorID()); assertEquals(SONG.getReleaseDate(), song.getReleaseDate()); assertEquals(SONG.getArtifactUri(), song.getArtifactUri()); assertEquals(SONG.getDurationInSeconds(), song.getDurationInSeconds()); }
@Test(expected = IllegalArgumentException.class) public void testDeserialisationFailsForIncorrectFormat() { Song.fromJson(RANDOM_JSON); }