@Test
public void testDoGetWhenUsageIsTimeoutMinuteExpiredShouldWriteTimeoutInResponse() throws ServletException, IOException {

    //GIVEN
    long expirationMinutes = 0L;
    long expirationSeconds = 2L;
    dialogDescriptors.add(dialogDescriptor);
    given(dialogDescriptor.getAttributes().getName()).willReturn(NAME);
    given(dialogDescriptor.getAttributes().getUsage()).willReturn(DialogDescriptorUsage.TIMEOUT);
    given(dialogDescriptor.getAttributes().getTimeout()).willReturn(VALIDITY_VALUE);
    given(expirationTimeProvider.getExpirationMinutes(VALIDITY_VALUE)).willReturn(expirationMinutes);
    given(expirationTimeProvider.getExpirationSeconds(VALIDITY_VALUE)).willReturn(expirationSeconds);
    //WHEN
    underTest.doGet(request, response);
    //THEN
    InOrder order = Mockito.inOrder(out);
    order.verify(out).write("{\"Name\":\"" + NAME + "\", \"Usage\":\"" + DialogDescriptorUsage.TIMEOUT);
    order.verify(out).write(" -> expires in " + expirationMinutes + ":" + expirationSeconds + " (min:sec)\"}");
}