OsInfoProvider implements Provider<OsSpecificInfo> { @Override public OsSpecificInfo get() { return osInfo; } @Inject  OsInfoProvider(@OsName final String osString, @OsArch final String osArch); @Override OsSpecificInfo get();  }
@Test public void testSupportedOS() { SUPPORTED.forEach((key, value) -> assertEquals(value, new OsInfoProvider(key, "i386").get().getName())); }
@Test(expected = UnsupportedOperationException.class) public void testUnsupportedOS() { for (String string : UNSUPPORTED) { new OsInfoProvider(string, "i386").get(); } }