@Test(expectedExceptions = DescriptorValidationFailedException.class)
public void testParseWhenUsageIsTimeoutAndValidityValueNotSetShouldThrowException() {

    //GIVEN
    given(dialogDescriptor.getAttribute("name")).willReturn("name");
    given(dialogDescriptor.getAttribute("usage")).willReturn("timeout");
    //WHEN
    underTest.getAttributes(dialogDescriptor);
    //THEN it should throw exception
}