Assert.notNull(tag);
Assert.hasText(tag.getLabel());
Assert.notNull(movieId);
Movie movie = idToMovieMap.get(movieId);
if (movie == null){
throw new ResourceNotFoundException("Movie not found.");
}
movie.getTags().add(tag);
Set<Movie> movies = tagToMoviesMap.get(tag);
if (movies == null){
movies = new HashSet<Movie>();