Coverage Summary for Class: WordCountResource (io.github.mkuchin.model)

Class Class, % Method, % Line, %
WordCountResource 100% (1/ 1) 50% (2/ 4) 66.7% (4/ 6)


1 package io.github.mkuchin.model; 2  3 import com.fasterxml.jackson.annotation.JsonAnyGetter; 4 import com.fasterxml.jackson.annotation.JsonIgnore; 5 import lombok.Value; 6  7 import java.util.HashMap; 8 import java.util.Map; 9  10 @Value 11 public class WordCountResource { 12  @JsonIgnore 13  String word; 14  @JsonIgnore 15  Long count; 16  17  @JsonAnyGetter 18  public Map<String, Object> object() { 19  var map = new HashMap<String, Object>(); 20  map.put(word, count); 21  return map; 22  } 23 }