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

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