@Test
public void validateApplicationIdTest() {

    NameValidationUtils.validateApplicationId("app");
    NameValidationUtils.validateApplicationId("app_2");
    List<String> invalids = Lists.newArrayList("appè", "App-2", "App.unix", "App 2");
    invalids.forEach(invalid -> {
        expectException(new Callable() {
            @Override
            public Object call() throws Exception {
                NameValidationUtils.validateApplicationId(invalid);
                return null;
            }
        }, InvalidNameException.class);
    });
}