@Test
  public void testPixelInvadersNetConfig() {
    Properties config = new Properties();
    config.put(ConfigConstant.PIXELINVADERS_ROW1, "ROTATE_180, NO_ROTATE");
    config.put(ConfigConstant.PIXELINVADERS_ROW2, "ROTATE_90, NO_ROTATE");
    config.put(ConfigConstant.PIXELINVADERS_PANEL_ORDER, "0,3, 1,2");
    config.put(ConfigConstant.PIXELINVADERS_NET_IP, "127.0.0.1");
    config.put(ConfigConstant.PIXELINVADERS_NET_PORT, "5333");
    ApplicationConfigurationHelper ph = new ApplicationConfigurationHelper(config);

    assertEquals(4, ph.getNrOfScreens());
    assertEquals(8, ph.getDeviceXResolution());
    assertEquals(8, ph.getDeviceYResolution());

    List<Integer> order = ph.getPanelOrder();
    assertEquals(Integer.valueOf(0), order.get(0));
    assertEquals(Integer.valueOf(3), order.get(1));
    assertEquals(Integer.valueOf(1), order.get(2));
    assertEquals(Integer.valueOf(2), order.get(3));

    assertEquals(0, ph.getI2cAddr().size());
    assertEquals(4, ph.getLpdDevice().size());
    assertEquals(OutputDeviceEnum.PIXELINVADERS_NET, ph.getOutputDevice());

    Map<Integer, RGBAdjust> correction = ph.getPixelInvadersCorrectionMap();
    assertTrue(correction != null);
  }
  @Test
  public void testPixelInvadersConfig() {
    Properties config = new Properties();
    config.put(ConfigConstant.PIXELINVADERS_ROW1, "ROTATE_180, NO_ROTATE");
    config.put(ConfigConstant.PIXELINVADERS_ROW2, "ROTATE_90, NO_ROTATE");
    config.put(ConfigConstant.PIXELINVADERS_PANEL_ORDER, "0,3, 1,2");

    config.put(ConfigConstant.PIXELINVADERS_COLORADJUST_R + "1", "100");
    config.put(ConfigConstant.PIXELINVADERS_COLORADJUST_G + "1", "130  ");
    config.put(ConfigConstant.PIXELINVADERS_COLORADJUST_B + "1", "150");

    config.put(ConfigConstant.PIXELINVADERS_COLORADJUST_R + "2", "4");
    config.put(ConfigConstant.PIXELINVADERS_COLORADJUST_G + "2", "-222");
    config.put(ConfigConstant.PIXELINVADERS_COLORADJUST_B + "2", "zzz");

    ApplicationConfigurationHelper ph = new ApplicationConfigurationHelper(config);

    assertEquals(4, ph.getNrOfScreens());
    assertEquals(8, ph.getDeviceXResolution());
    assertEquals(8, ph.getDeviceYResolution());

    List<Integer> order = ph.getPanelOrder();
    assertEquals(Integer.valueOf(0), order.get(0));
    assertEquals(Integer.valueOf(3), order.get(1));
    assertEquals(Integer.valueOf(1), order.get(2));
    assertEquals(Integer.valueOf(2), order.get(3));

    assertEquals(0, ph.getI2cAddr().size());
    assertEquals(4, ph.getLpdDevice().size());
    assertEquals(OutputDeviceEnum.PIXELINVADERS, ph.getOutputDevice());

    Map<Integer, RGBAdjust> correction = ph.getPixelInvadersCorrectionMap();
    assertFalse(correction.containsKey(ConfigConstant.PIXELINVADERS_COLORADJUST_R + "0"));
    assertFalse(correction.containsKey(ConfigConstant.PIXELINVADERS_COLORADJUST_G + "0"));
    assertFalse(correction.containsKey(ConfigConstant.PIXELINVADERS_COLORADJUST_B + "0"));

    RGBAdjust corr = correction.get(1);
    assertTrue(corr != null);
    assertEquals(100, corr.getR());
    assertEquals(130, corr.getG());
    assertEquals(150, corr.getB());

    corr = correction.get(2);
    assertTrue(corr != null);
    assertEquals(4, corr.getR());
    assertEquals(0, corr.getG());
    assertEquals(0, corr.getB());
  }