### Question:
EntitySuppliers { public static Supplier<SshMachineLocation> uniqueSshMachineLocation(Entity entity) { return new UniqueSshMchineLocation(entity); }  static Supplier<SshMachineLocation> uniqueSshMachineLocation(Entity entity);  }### Answer:
@Test public void testUniqueSshMachineLocation() throws Exception { entity.addLocations(ImmutableList.of(machine)); assertEquals(EntitySuppliers.uniqueSshMachineLocation(entity).get(), machine); }
@Test public void testUniqueSshMachineLocationWhenNoLocation() throws Exception { Supplier<SshMachineLocation> supplier = EntitySuppliers.uniqueSshMachineLocation(entity); try { supplier.get(); fail(); } catch (IllegalStateException e) { } }