### Question:
AbstractBuilder { protected List<ParamEntity> getParamEntities(Map<String, String> inputs) { List<ParamEntity> paramEntityList = new ArrayList<>(); if (inputs != null && !inputs.isEmpty()) { inputs.keySet().forEach(key -> { ParamEntity paramEntity = new ParamEntity(); paramEntity.setName(key); paramEntity.setValue(inputs.get(key)); paramEntityList.add(paramEntity); }); } return paramEntityList; }   static final String OPERATION_TYPE; static final String RESOURCE_TYPE; }### Answer:
@Test public void getParamEntitiesTest() throws Exception { Map<String, String> inputs = new HashMap<>(); inputs.put("foo", "bar"); List<ParamEntity> list = abstractBuilder.getParamEntities(inputs); assertEquals(1, list.size()); assertEquals("foo", list.get(0).getName()); assertEquals("bar", list.get(0).getValue()); }
@Test public void getParamEntitiesNullInputsTest() { List<ParamEntity> list = abstractBuilder.getParamEntities(null); assertEquals(0, list.size()); }
@Test public void getParamEntitiesEmptyInputsTest() { List<ParamEntity> list = abstractBuilder.getParamEntities(new HashMap<>()); assertEquals(0, list.size()); }