// Path: server/user-management/src/main/java/de/budgetfreak/usermanagement/domain/User.java
// @Entity(name = "BF_USER")
// public class User {
// 
//     @Id
//     @GeneratedValue(strategy = GenerationType.IDENTITY)
//     @Column(name = "ID")
//     private Long id;
// 
//     @Column(name = "NAME")
//     private String name;
// 
//     @Column(name = "CURRENCY")
//     private String currency;
// 
//     public User() {
//     }
// 
//     public User(String name, String currency) {
//         this.name = name;
//         this.currency = currency;
//     }
// 
//     public Long getId() {
//         return id;
//     }
// 
//     public User setId(Long id) {
//         this.id = id;
//         return this;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public User setName(String name) {
//         this.name = name;
//         return this;
//     }
// 
//     public String getCurrency() {
//         return currency;
//     }
// 
//     public User setCurrency(String currency) {
//         this.currency = currency;
//         return this;
//     }
// }
// 
// Path: server/user-management/src/main/java/de/budgetfreak/usermanagement/domain/UserRepository.java
// @Repository
// public interface UserRepository extends JpaRepository<User, Long> {
// 
//     User findByName(String name);
// }


import de.budgetfreak.usermanagement.domain.User;
import de.budgetfreak.usermanagement.domain.UserRepository;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.jdbc.EmbeddedDatabaseConnection;
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.Optional;
import static org.assertj.core.api.Assertions.assertThat;
package de.budgetfreak.budgeting.domain;




@RunWith(SpringRunner.class)
@DataJpaTest
@AutoConfigureTestDatabase(connection = EmbeddedDatabaseConnection.H2)
@EntityScan("de.budgetfreak")
@EnableJpaRepositories("de.budgetfreak")
public class BudgetRepositoryTest {

    @Autowired
    private BudgetRepository testSubject;

    @Autowired
    private UserRepository userRepository;

    @Test
    public void shouldSaveNewMaterCategories() {
// Path: server/user-management/src/main/java/de/budgetfreak/usermanagement/domain/User.java
// @Entity(name = "BF_USER")
// public class User {
// 
//     @Id
//     @GeneratedValue(strategy = GenerationType.IDENTITY)
//     @Column(name = "ID")
//     private Long id;
// 
//     @Column(name = "NAME")
//     private String name;
// 
//     @Column(name = "CURRENCY")
//     private String currency;
// 
//     public User() {
//     }
// 
//     public User(String name, String currency) {
//         this.name = name;
//         this.currency = currency;
//     }
// 
//     public Long getId() {
//         return id;
//     }
// 
//     public User setId(Long id) {
//         this.id = id;
//         return this;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public User setName(String name) {
//         this.name = name;
//         return this;
//     }
// 
//     public String getCurrency() {
//         return currency;
//     }
// 
//     public User setCurrency(String currency) {
//         this.currency = currency;
//         return this;
//     }
// }
// 
// Path: server/user-management/src/main/java/de/budgetfreak/usermanagement/domain/UserRepository.java
// @Repository
// public interface UserRepository extends JpaRepository<User, Long> {
// 
//     User findByName(String name);
// }


// Path: server/budgeting/src/test/java/de/budgetfreak/budgeting/domain/BudgetRepositoryTest.java
import de.budgetfreak.usermanagement.domain.User;
import de.budgetfreak.usermanagement.domain.UserRepository;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.jdbc.EmbeddedDatabaseConnection;
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.Optional;
import static org.assertj.core.api.Assertions.assertThat;

package de.budgetfreak.budgeting.domain;




@RunWith(SpringRunner.class)
@DataJpaTest
@AutoConfigureTestDatabase(connection = EmbeddedDatabaseConnection.H2)
@EntityScan("de.budgetfreak")
@EnableJpaRepositories("de.budgetfreak")
public class BudgetRepositoryTest {

    @Autowired
    private BudgetRepository testSubject;

    @Autowired
    private UserRepository userRepository;

    @Test
    public void shouldSaveNewMaterCategories() {
        User user = userRepository.save(new User().setName("Bob").setCurrency("€"));