// Path: src/main/java/com/hantsylabs/restexample/springmvc/domain/User.java
// @Data
// @Builder
// @NoArgsConstructor
// @AllArgsConstructor
// @Entity
// @Table(name = "users")
// public class User implements UserDetails, Serializable {
// 
//     /**
//      *
//      */
//     private static final long serialVersionUID = 1L;
// 
//     @Id()
//     @GeneratedValue(strategy = GenerationType.IDENTITY)
//     @Column(name = "id")
//     private Long id;
// 
//     @Column(name = "username")
//     private String username;
// 
//     @Column(name = "password")
//     private String password;
// 
//     @Column(name = "name")
//     private String name;
// 
//     @Column(name = "email")
//     private String email;
// 
//     @Column(name = "role")
//     private String role;
// 
//     @Column(name = "created_date")
//     @CreatedDate
//     private LocalDateTime createdDate;
// 
//     public String getName() {
//         if (this.name == null || this.name.trim().length() == 0) {
//             return this.username;
//         }
//         return name;
//     }
// 
//     @Override
//     public Collection<? extends GrantedAuthority> getAuthorities() {
//         return Arrays.asList(new SimpleGrantedAuthority("ROLE_" + this.role));
//     }
// 
//     @Override
//     public String getPassword() {
//         return this.password;
//     }
// 
//     @Override
//     public String getUsername() {
//         return this.username;
//     }
// 
//     @Override
//     public boolean isAccountNonExpired() {
//         return true;
//     }
// 
//     @Override
//     public boolean isAccountNonLocked() {
//         return true;
//     }
// 
//     @Override
//     public boolean isCredentialsNonExpired() {
//         return true;
//     }
// 
//     @Override
// 
//     public boolean isEnabled() {
//         return true;
//     }
// 
// 
// }
// 
// Path: src/main/java/com/hantsylabs/restexample/springmvc/repository/CommentRepository.java
// public interface CommentRepository extends JpaRepository<Comment, Long> {
// 
//     public List<Comment> findByPost(Post post);
// 
//     public Page<Comment> findByPostId(Long id, Pageable page);
// 
// }
// 
// Path: src/main/java/com/hantsylabs/restexample/springmvc/repository/PostRepository.java
// public interface PostRepository extends JpaRepository<Post, Long>,//
//         JpaSpecificationExecutor<Post>{
// 
// }
// 
// Path: src/main/java/com/hantsylabs/restexample/springmvc/repository/UserRepository.java
// public interface UserRepository extends JpaRepository<User, Long>,
//         JpaSpecificationExecutor<User> {
// 
//     public User findByUsername(String username);
// }


import com.hantsylabs.restexample.springmvc.domain.User;
import com.hantsylabs.restexample.springmvc.repository.CommentRepository;
import com.hantsylabs.restexample.springmvc.repository.PostRepository;
import com.hantsylabs.restexample.springmvc.repository.UserRepository;
import org.jbehave.core.configuration.Configuration;
import org.jbehave.core.configuration.MostUsefulConfiguration;
import org.jbehave.core.embedder.Embedder;
import org.jbehave.core.embedder.EmbedderControls;
import org.jbehave.core.io.*;
import org.jbehave.core.junit.JUnitStory;
import org.jbehave.core.reporters.FilePrintStreamFactory.ResolveToPackagedName;
import org.jbehave.core.reporters.StoryReporterBuilder;
import org.jbehave.core.steps.ParameterControls;
import java.util.Arrays;
import javax.inject.Inject;
import lombok.extern.slf4j.Slf4j;
import static org.jbehave.core.reporters.Format.*;
import org.jbehave.core.steps.InjectableStepsFactory;
import org.jbehave.core.steps.InstanceStepsFactory;
import org.springframework.security.crypto.password.PasswordEncoder;
package com.hantsylabs.restexample.springmvc.test.jbehave;




@Slf4j
public abstract class AbstractSpringJBehaveStory extends JUnitStory {

    @Inject
    PostRepository posts;

    @Inject
    CommentRepository comments;

    @Inject
// Path: src/main/java/com/hantsylabs/restexample/springmvc/domain/User.java
// @Data
// @Builder
// @NoArgsConstructor
// @AllArgsConstructor
// @Entity
// @Table(name = "users")
// public class User implements UserDetails, Serializable {
// 
//     /**
//      *
//      */
//     private static final long serialVersionUID = 1L;
// 
//     @Id()
//     @GeneratedValue(strategy = GenerationType.IDENTITY)
//     @Column(name = "id")
//     private Long id;
// 
//     @Column(name = "username")
//     private String username;
// 
//     @Column(name = "password")
//     private String password;
// 
//     @Column(name = "name")
//     private String name;
// 
//     @Column(name = "email")
//     private String email;
// 
//     @Column(name = "role")
//     private String role;
// 
//     @Column(name = "created_date")
//     @CreatedDate
//     private LocalDateTime createdDate;
// 
//     public String getName() {
//         if (this.name == null || this.name.trim().length() == 0) {
//             return this.username;
//         }
//         return name;
//     }
// 
//     @Override
//     public Collection<? extends GrantedAuthority> getAuthorities() {
//         return Arrays.asList(new SimpleGrantedAuthority("ROLE_" + this.role));
//     }
// 
//     @Override
//     public String getPassword() {
//         return this.password;
//     }
// 
//     @Override
//     public String getUsername() {
//         return this.username;
//     }
// 
//     @Override
//     public boolean isAccountNonExpired() {
//         return true;
//     }
// 
//     @Override
//     public boolean isAccountNonLocked() {
//         return true;
//     }
// 
//     @Override
//     public boolean isCredentialsNonExpired() {
//         return true;
//     }
// 
//     @Override
// 
//     public boolean isEnabled() {
//         return true;
//     }
// 
// 
// }
// 
// Path: src/main/java/com/hantsylabs/restexample/springmvc/repository/CommentRepository.java
// public interface CommentRepository extends JpaRepository<Comment, Long> {
// 
//     public List<Comment> findByPost(Post post);
// 
//     public Page<Comment> findByPostId(Long id, Pageable page);
// 
// }
// 
// Path: src/main/java/com/hantsylabs/restexample/springmvc/repository/PostRepository.java
// public interface PostRepository extends JpaRepository<Post, Long>,//
//         JpaSpecificationExecutor<Post>{
// 
// }
// 
// Path: src/main/java/com/hantsylabs/restexample/springmvc/repository/UserRepository.java
// public interface UserRepository extends JpaRepository<User, Long>,
//         JpaSpecificationExecutor<User> {
// 
//     public User findByUsername(String username);
// }


// Path: src/test/java/com/hantsylabs/restexample/springmvc/test/jbehave/AbstractSpringJBehaveStory.java
import com.hantsylabs.restexample.springmvc.domain.User;
import com.hantsylabs.restexample.springmvc.repository.CommentRepository;
import com.hantsylabs.restexample.springmvc.repository.PostRepository;
import com.hantsylabs.restexample.springmvc.repository.UserRepository;
import org.jbehave.core.configuration.Configuration;
import org.jbehave.core.configuration.MostUsefulConfiguration;
import org.jbehave.core.embedder.Embedder;
import org.jbehave.core.embedder.EmbedderControls;
import org.jbehave.core.io.*;
import org.jbehave.core.junit.JUnitStory;
import org.jbehave.core.reporters.FilePrintStreamFactory.ResolveToPackagedName;
import org.jbehave.core.reporters.StoryReporterBuilder;
import org.jbehave.core.steps.ParameterControls;
import java.util.Arrays;
import javax.inject.Inject;
import lombok.extern.slf4j.Slf4j;
import static org.jbehave.core.reporters.Format.*;
import org.jbehave.core.steps.InjectableStepsFactory;
import org.jbehave.core.steps.InstanceStepsFactory;
import org.springframework.security.crypto.password.PasswordEncoder;

package com.hantsylabs.restexample.springmvc.test.jbehave;




@Slf4j
public abstract class AbstractSpringJBehaveStory extends JUnitStory {

    @Inject
    PostRepository posts;

    @Inject
    CommentRepository comments;

    @Inject
    UserRepository users;