// Path: druid-spring-boot-example/druid-spring-boot-jpa-example/src/main/java/com/github/trang/druid/example/jpa/model/City.java
// @Entity
// @Table(name = "city")
// @Data
// public class City implements Serializable {
// 
//     private static final long serialVersionUID = 1L;
// 
//     @Id
//     @GeneratedValue(strategy = GenerationType.IDENTITY)
//     @Column(name = "id")
//     private Long id;
// 
//     @Column(name = "name")
//     private String name;
// 
//     @Column(name = "state")
//     private String state;
// 
//     @Column(name = "country")
//     private String country;
// 
// }


import java.util.List;
import java.util.Optional;
import org.junit.Assert;
import org.junit.Test;
import com.github.trang.druid.example.jpa.model.City;
package com.github.trang.druid.example.jpa.test.coveralls;




/**
 * MyBatis 测试
 *
 * @author trang
 */
public class JpaTests extends BaseTest {

    @Test
    public void testOne() {
        Optional.ofNullable(cityRepository.findOne(1L))
                .map(gson::toJson)
                .ifPresent(city -> log.info("{}", city));
    }

    @Test
    public void testAll() {
// Path: druid-spring-boot-example/druid-spring-boot-jpa-example/src/main/java/com/github/trang/druid/example/jpa/model/City.java
// @Entity
// @Table(name = "city")
// @Data
// public class City implements Serializable {
// 
//     private static final long serialVersionUID = 1L;
// 
//     @Id
//     @GeneratedValue(strategy = GenerationType.IDENTITY)
//     @Column(name = "id")
//     private Long id;
// 
//     @Column(name = "name")
//     private String name;
// 
//     @Column(name = "state")
//     private String state;
// 
//     @Column(name = "country")
//     private String country;
// 
// }


// Path: druid-spring-boot-example/druid-spring-boot-jpa-example/src/test/java/com/github/trang/druid/example/jpa/test/coveralls/JpaTests.java
import java.util.List;
import java.util.Optional;
import org.junit.Assert;
import org.junit.Test;
import com.github.trang.druid.example.jpa.model.City;

package com.github.trang.druid.example.jpa.test.coveralls;




/**
 * MyBatis 测试
 *
 * @author trang
 */
public class JpaTests extends BaseTest {

    @Test
    public void testOne() {
        Optional.ofNullable(cityRepository.findOne(1L))
                .map(gson::toJson)
                .ifPresent(city -> log.info("{}", city));
    }

    @Test
    public void testAll() {
        List<City> cities = cityRepository.findAll();