diff --git a/partial-response/src/main/java/com/iluwatar/partialresponse/Video.java b/partial-response/src/main/java/com/iluwatar/partialresponse/Video.java index 2879b96ed..3717d8db2 100644 --- a/partial-response/src/main/java/com/iluwatar/partialresponse/Video.java +++ b/partial-response/src/main/java/com/iluwatar/partialresponse/Video.java @@ -31,26 +31,26 @@ package com.iluwatar.partialresponse; public class Video { private String id; private String title; - private Long length; + private Integer length; private String description; - private String publisher; - private String status; + private String director; + private String language; /** * @param id video unique id * @param title video title - * @param length video length in seconds + * @param length video length in minutes * @param description video description by publisher - * @param publisher video publisher name - * @param status video status {private, public} + * @param director video director name + * @param language video language {private, public} */ - public Video(String id, String title, Long length, String description, String publisher, String status) { + public Video(String id, String title, Integer length, String description, String director, String language) { this.id = id; this.title = title; this.length = length; this.description = description; - this.publisher = publisher; - this.status = status; + this.director = director; + this.language = language; } @Override @@ -60,8 +60,8 @@ public class Video { ", title='" + title + '\'' + ", length=" + length + ", description='" + description + '\'' + - ", publisher='" + publisher + '\'' + - ", status='" + status + '\'' + + ", director='" + director + '\'' + + ", language='" + language + '\'' + '}'; } } diff --git a/partial-response/src/test/java/com/iluwatar/partialresponse/VideoResourceTest.java b/partial-response/src/test/java/com/iluwatar/partialresponse/VideoResourceTest.java index 6f3524611..67d34edba 100644 --- a/partial-response/src/test/java/com/iluwatar/partialresponse/VideoResourceTest.java +++ b/partial-response/src/test/java/com/iluwatar/partialresponse/VideoResourceTest.java @@ -36,9 +36,9 @@ public class VideoResourceTest { @Before public void setUp() { Map videos = new HashMap<>(); - videos.put("1", new Video("1", "title 1", 100L, "", "", "")); - videos.put("1", new Video("2", "title 2", 100L, "", "", "")); - videos.put("1", new Video("3", "title 3", 100L, "", "", "")); + videos.put("1", new Video("1", "Avatar", 178, "epic science fiction film", "James Cameron", "English")); + videos.put("1", new Video("2", "Godzilla Resurgence", 120, "Action & drama movie|", "Hideaki Anno", "Japanese")); + videos.put("1", new Video("3", "Interstellar", 169, "Adventure & Sci-Fi", "Christopher Nolan", "English")); resource = new VideoResource(videos); }