@SuppressWarnings("unchecked")
@Test
public void testNginxWithSSL() {

    String data1 = "Active connections: 1\n" +
            "server accepts handled requests request_time\n" +
            " 65357 65357 56197 37549\n" +
            "ssl new reused(SID+ticket)\n" +
            " 0 0\n" +
            "Reading: 0 Writing: 1 Waiting: 0\n" +
            "SSL_Requests: 0 SSL_Handshake: 0 SSL_Handshake_Time: 0";
    ManualClock clock = new ManualClock();
    TestNginxGaugeSet nginxGaugeSet = new TestNginxGaugeSet(clock);
    Map<MetricName, Metric> metrics = nginxGaugeSet.getMetrics();
    Assert.assertEquals(8, metrics.keySet().size());
    clock.addMillis(20);
    nginxGaugeSet.setData(data1);
    Gauge<Double> connAccepted = (Gauge<Double>)metrics.get(MetricName.build("conn.accepted"));
    Gauge<Double> connHandled = (Gauge<Double>)metrics.get(MetricName.build("conn.handled"));
    Gauge<Double> reqQps = (Gauge<Double>)metrics.get(MetricName.build("request.qps"));
    Gauge<Double> reqAvgRt = (Gauge<Double>)metrics.get(MetricName.build("request.avg_rt"));
    Gauge<Long> connActive = (Gauge<Long>)metrics.get(MetricName.build("conn.active"));
    Gauge<Long> connReading = (Gauge<Long>)metrics.get(MetricName.build("conn.reading"));
    Gauge<Long> connWriting = (Gauge<Long>)metrics.get(MetricName.build("conn.writing"));
    Gauge<Long> connWaiting = (Gauge<Long>)metrics.get(MetricName.build("conn.waiting"));
    Assert.assertEquals(0.0d, connAccepted.getValue(), 0.0001d);
    Assert.assertEquals(0.0d, connHandled.getValue(), 0.0001d);
    Assert.assertEquals(0.0d, reqQps.getValue(), 0.0001d);
    Assert.assertEquals(0.0d, reqAvgRt.getValue(), 0.0001d);
    Assert.assertEquals(1L, connActive.getValue().longValue());
    Assert.assertEquals(0L, connReading.getValue().longValue());
    Assert.assertEquals(1L, connWriting.getValue().longValue());
    Assert.assertEquals(0L, connWaiting.getValue().longValue());
}