// Path: src/main/java/com/idugalic/commandside/blog/web/CreateBlogPostRequest.java
// public class CreateBlogPostRequest {
// 
//     @NotNull(message = "Title is mandatory")
//     @NotBlank(message = "Title is mandatory")
//     private String title;
//     @NotNull(message = "rawContent is mandatory")
//     @NotBlank(message = "rawContent is mandatory")
//     private String rawContent;
//     @NotNull(message = "PublicSlug is mandatory")
//     @NotBlank(message = "PublicSlug is mandatory")
//     private String publicSlug;
//     @NotNull
//     private Boolean draft;
//     @NotNull
//     private Boolean broadcast;
//     @Future(message = "'Publish at' date must be in the future")
//     @NotNull
//     private Date publishAt;
//     @NotNull
//     private BlogPostCategory category;
// 
//     public CreateBlogPostRequest() {
//     }
// 
//     public String getTitle() {
//         return title;
//     }
// 
//     public void setTitle(String title) {
//         this.title = title;
//     }
// 
//     public String getRawContent() {
//         return rawContent;
//     }
// 
//     public void setRawContent(String rawContent) {
//         this.rawContent = rawContent;
//     }
// 
//     public String getPublicSlug() {
//         return publicSlug;
//     }
// 
//     public void setPublicSlug(String publicSlug) {
//         this.publicSlug = publicSlug;
//     }
// 
//     public Boolean getDraft() {
//         return draft;
//     }
// 
//     public void setDraft(Boolean draft) {
//         this.draft = draft;
//     }
// 
//     public Boolean getBroadcast() {
//         return broadcast;
//     }
// 
//     public void setBroadcast(Boolean broadcast) {
//         this.broadcast = broadcast;
//     }
// 
//     public Date getPublishAt() {
//         return publishAt;
//     }
// 
//     public void setPublishAt(Date publishAt) {
//         this.publishAt = publishAt;
//     }
// 
//     public BlogPostCategory getCategory() {
//         return category;
//     }
// 
//     public void setCategory(BlogPostCategory category) {
//         this.category = category;
//     }
// 
// }
// 
// Path: src/main/java/com/idugalic/commandside/project/web/CreateProjectRequest.java
// public class CreateProjectRequest {
// 
//     private String name;
//     private String repoUrl;
//     private String siteUrl;
//     private String category;
//     private String description;
// 
//     public CreateProjectRequest() {
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public String getRepoUrl() {
//         return repoUrl;
//     }
// 
//     public void setRepoUrl(String repoUrl) {
//         this.repoUrl = repoUrl;
//     }
// 
//     public String getSiteUrl() {
//         return siteUrl;
//     }
// 
//     public void setSiteUrl(String siteUrl) {
//         this.siteUrl = siteUrl;
//     }
// 
//     public String getCategory() {
//         return category;
//     }
// 
//     public void setCategory(String category) {
//         this.category = category;
//     }
// 
//     public String getDescription() {
//         return description;
//     }
// 
//     public void setDescription(String description) {
//         this.description = description;
//     }
// 
// }


import com.idugalic.commandside.blog.web.CreateBlogPostRequest;
import com.idugalic.commandside.project.web.CreateProjectRequest;
import com.idugalic.common.blog.model.BlogPostCategory;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.oauth2.client.DefaultOAuth2ClientContext;
import org.springframework.security.oauth2.client.OAuth2RestTemplate;
import org.springframework.security.oauth2.client.token.grant.password.ResourceOwnerPasswordResourceDetails;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.Calendar;
import static java.lang.String.format;
import static java.util.Arrays.asList;
import static org.assertj.core.api.Assertions.assertThat;
package com.idugalic;




/**
 * Integration test for {@link Application} starting on a random port.
 *
 * @author idugalic
 */
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
public class ApplicationIntegrationTest {

    @Value("${local.server.port}")
    protected int port;

    private OAuth2RestTemplate outh2RestTemplate;

    private CreateBlogPostRequest createBlogPostRequest;
    private CreateProjectRequest createProjectRequest;
    private Calendar future;


    @Before
    public void setup() {

        //Some test data
        future = Calendar.getInstance();
        future.add(Calendar.DAY_OF_YEAR, 1);

        createBlogPostRequest = new CreateBlogPostRequest();
        createBlogPostRequest.setTitle("title");
        createBlogPostRequest.setCategory(BlogPostCategory.ENGINEERING);
        createBlogPostRequest.setBroadcast(Boolean.FALSE);
        createBlogPostRequest.setDraft(Boolean.TRUE);
        createBlogPostRequest.setPublicSlug("publicurl");
// Path: src/main/java/com/idugalic/commandside/blog/web/CreateBlogPostRequest.java
// public class CreateBlogPostRequest {
// 
//     @NotNull(message = "Title is mandatory")
//     @NotBlank(message = "Title is mandatory")
//     private String title;
//     @NotNull(message = "rawContent is mandatory")
//     @NotBlank(message = "rawContent is mandatory")
//     private String rawContent;
//     @NotNull(message = "PublicSlug is mandatory")
//     @NotBlank(message = "PublicSlug is mandatory")
//     private String publicSlug;
//     @NotNull
//     private Boolean draft;
//     @NotNull
//     private Boolean broadcast;
//     @Future(message = "'Publish at' date must be in the future")
//     @NotNull
//     private Date publishAt;
//     @NotNull
//     private BlogPostCategory category;
// 
//     public CreateBlogPostRequest() {
//     }
// 
//     public String getTitle() {
//         return title;
//     }
// 
//     public void setTitle(String title) {
//         this.title = title;
//     }
// 
//     public String getRawContent() {
//         return rawContent;
//     }
// 
//     public void setRawContent(String rawContent) {
//         this.rawContent = rawContent;
//     }
// 
//     public String getPublicSlug() {
//         return publicSlug;
//     }
// 
//     public void setPublicSlug(String publicSlug) {
//         this.publicSlug = publicSlug;
//     }
// 
//     public Boolean getDraft() {
//         return draft;
//     }
// 
//     public void setDraft(Boolean draft) {
//         this.draft = draft;
//     }
// 
//     public Boolean getBroadcast() {
//         return broadcast;
//     }
// 
//     public void setBroadcast(Boolean broadcast) {
//         this.broadcast = broadcast;
//     }
// 
//     public Date getPublishAt() {
//         return publishAt;
//     }
// 
//     public void setPublishAt(Date publishAt) {
//         this.publishAt = publishAt;
//     }
// 
//     public BlogPostCategory getCategory() {
//         return category;
//     }
// 
//     public void setCategory(BlogPostCategory category) {
//         this.category = category;
//     }
// 
// }
// 
// Path: src/main/java/com/idugalic/commandside/project/web/CreateProjectRequest.java
// public class CreateProjectRequest {
// 
//     private String name;
//     private String repoUrl;
//     private String siteUrl;
//     private String category;
//     private String description;
// 
//     public CreateProjectRequest() {
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public String getRepoUrl() {
//         return repoUrl;
//     }
// 
//     public void setRepoUrl(String repoUrl) {
//         this.repoUrl = repoUrl;
//     }
// 
//     public String getSiteUrl() {
//         return siteUrl;
//     }
// 
//     public void setSiteUrl(String siteUrl) {
//         this.siteUrl = siteUrl;
//     }
// 
//     public String getCategory() {
//         return category;
//     }
// 
//     public void setCategory(String category) {
//         this.category = category;
//     }
// 
//     public String getDescription() {
//         return description;
//     }
// 
//     public void setDescription(String description) {
//         this.description = description;
//     }
// 
// }


// Path: src/test/java/com/idugalic/ApplicationIntegrationTest.java
import com.idugalic.commandside.blog.web.CreateBlogPostRequest;
import com.idugalic.commandside.project.web.CreateProjectRequest;
import com.idugalic.common.blog.model.BlogPostCategory;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.oauth2.client.DefaultOAuth2ClientContext;
import org.springframework.security.oauth2.client.OAuth2RestTemplate;
import org.springframework.security.oauth2.client.token.grant.password.ResourceOwnerPasswordResourceDetails;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.Calendar;
import static java.lang.String.format;
import static java.util.Arrays.asList;
import static org.assertj.core.api.Assertions.assertThat;

package com.idugalic;




/**
 * Integration test for {@link Application} starting on a random port.
 *
 * @author idugalic
 */
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
public class ApplicationIntegrationTest {

    @Value("${local.server.port}")
    protected int port;

    private OAuth2RestTemplate outh2RestTemplate;

    private CreateBlogPostRequest createBlogPostRequest;
    private CreateProjectRequest createProjectRequest;
    private Calendar future;


    @Before
    public void setup() {

        //Some test data
        future = Calendar.getInstance();
        future.add(Calendar.DAY_OF_YEAR, 1);

        createBlogPostRequest = new CreateBlogPostRequest();
        createBlogPostRequest.setTitle("title");
        createBlogPostRequest.setCategory(BlogPostCategory.ENGINEERING);
        createBlogPostRequest.setBroadcast(Boolean.FALSE);
        createBlogPostRequest.setDraft(Boolean.TRUE);
        createBlogPostRequest.setPublicSlug("publicurl");
        createBlogPostRequest.setRawContent("rawContent");