@Test(groups = { "unit" }, dataProvider = "subTypes")

public void statusCodeIsCorrect(Class<DocumentClientException> type, int expectedStatusCode) {
    try {
        final DocumentClientException instance = type
            .getConstructor(String.class,  HttpResponseHeaders.class, String.class)
            .newInstance("some-message", null, "some-uri");
        assertEquals(instance.getStatusCode(), expectedStatusCode);
    } catch (IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException error) {
        String message = lenientFormat("could not create instance of %s due to %s", type, error);
        throw new AssertionError(message, error);
    }
}