private Pet createRandomPet() { Pet pet = new Pet(); pet.setId(TestUtils.nextId()); pet.setName("gorilla"); Category category = new Category(); category.setName("really-happy"); pet.setCategory(category); pet.setStatus(Pet.StatusEnum.AVAILABLE); List<String> photos = Arrays.asList(new String[] {"http://foo.bar.com/1", "http://foo.bar.com/2"}); pet.setPhotoUrls(photos); return pet; }