class FilterRepository {

  void save(final Filter filter) {
    if (filter == null) {
      throw new IllegalArgumentException("Can't save null filter");
    }

    if (exists(filter.getId())) {
      throw new IllegalArgumentException(
          String.format("Filter with id %s already exists", filter.getId()));
    }

    filters.put(filter.getId(), filter);
  }

  public  FilterRepository();

}