### Question:
LoginsCommand { public static SolarisEntry getAttributesFor(String username, SolarisConnection conn) { SolarisEntry entry = null; final String cmd = conn.buildCommand(true, "logins -oxma -l ", username); String out = conn.executeCommand(cmd); if (out.endsWith("was not found")) { return null; } entry = getEntry(out, username); return entry; } private  LoginsCommand(); static SolarisEntry getAttributesFor(String username, SolarisConnection conn); static SolarisEntry getEntry(String accountLine, String username); static boolean isLoginsRequired(Set<NativeAttribute> attrs);  }### Answer:
@Test public void test() { SolarisEntry result = LoginsCommand.getAttributesFor("root", getConnection()); AssertJUnit.assertTrue(result.getAttributeSet().size() >= 5); Set<Attribute> attrSet = result.getAttributeSet(); for (Attribute attribute : attrSet) { if (attribute.getName().equals(NativeAttribute.NAME)) { assertNotNull(attribute.getValue()); assertTrue(attribute.getValue().size() == 1); assertEquals("root", attribute.getValue().get(0)); break; } } }