GaugeRepository repo = gaugeRepository;
String myGaugeName = "myGauge";
String yourGaugeName = "yourGauge";
// Create and save a Gauge named 'myGauge'
Gauge g1 = new Gauge(myGaugeName);
Gauge myGauge = repo.save(g1);
assertThat(myGauge.getName(), is(notNullValue()));
// Create and save a Gauge named 'yourGauge'
Gauge g2 = new Gauge(yourGaugeName);
Gauge yourGauge = repo.save(g2);
assertThat(yourGauge.getName(), is(notNullValue()));
assertTrue(repo.exists(yourGauge.getName()));
// Retrieve by name and compare for equality to previously saved instance.
Gauge result = repo.findOne(myGaugeName);
assertThat(result, equalTo(myGauge));
result = repo.findOne(yourGauge.getName());
assertThat(result, equalTo(yourGauge));